{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comos-gateway-com/json-schema/comos-gateway-com-tool-call-result-schema.json",
  "title": "ToolCallResult",
  "description": "MCP tool-call envelope. The tool payload is a JSON string at result.content[0].text — parse it to read the result.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comos-gateway-com-openapi.yml#/components/schemas/ToolCallResult",
  "type": "object",
  "properties": {
    "result": {
      "type": "object",
      "description": "The MCP result. Its `content` array carries the tool payload.",
      "properties": {
        "content": {
          "type": "array",
          "description": "MCP content parts. Text parts carry a JSON-encoded payload.",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Content part type, e.g. \"text\"."
              },
              "text": {
                "type": "string",
                "description": "JSON-encoded tool payload."
              }
            }
          }
        }
      }
    },
    "isMetaTool": {
      "type": "boolean",
      "description": "True for federation meta-tools (e.g. federation_search)."
    },
    "toolName": {
      "type": "string",
      "description": "Echo of the invoked tool name."
    },
    "contextToken": {
      "type": "string",
      "description": "Federation context token (carries no credential). Pass it back in the X-Context-Token header, with the same Authorization header, on follow-up calls."
    },
    "error": {
      "type": "string",
      "description": "Present instead of `result` when the call failed."
    }
  },
  "additionalProperties": true
}