{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kaptionai-com/json-schema/kaptionai-com-sse-stream-schema.json",
  "title": "SseStream",
  "description": "Server-sent events. The `data` of each `message` event is one JSON-encoded JsonRpcResponse (contentSchema); on GET /mcp it can also be a server request or notification.",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kaptionai-com-openapi.json#/components/schemas/SseStream",
  "type": "string",
  "contentMediaType": "text/event-stream",
  "contentSchema": {
    "$ref": "#/$defs/JsonRpcResponse"
  },
  "$defs": {
    "JsonRpcError": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "data": {}
      }
    },
    "JsonRpcResponse": {
      "type": "object",
      "required": [
        "jsonrpc",
        "id"
      ],
      "properties": {
        "jsonrpc": {
          "const": "2.0"
        },
        "id": {
          "type": [
            "string",
            "integer",
            "null"
          ]
        },
        "result": {
          "description": "The method's result. For tools/call it is a ToolResult.",
          "anyOf": [
            {
              "$ref": "#/$defs/ToolResult"
            },
            {
              "type": "object"
            }
          ]
        },
        "error": {
          "$ref": "#/$defs/JsonRpcError"
        }
      }
    },
    "ToolResult": {
      "type": "object",
      "required": [
        "content"
      ],
      "properties": {
        "content": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          }
        },
        "structuredContent": {
          "type": "object",
          "properties": {
            "result": {}
          }
        },
        "isError": {
          "type": "boolean",
          "description": "true when the tool failed; the reason is in content."
        }
      }
    }
  }
}