{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/isgenai/json-schema/isgenai-json-rpc-message-schema.json",
  "title": "JsonRpcMessage",
  "description": "One JSON-RPC 2.0 request or notification.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/isgenai-mcp-api-openapi.yml#/components/schemas/JsonRpcMessage",
  "oneOf": [
    {
      "$ref": "#/$defs/JsonRpcRequest"
    },
    {
      "$ref": "#/$defs/JsonRpcNotification"
    }
  ],
  "$defs": {
    "JsonRpcId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ]
    },
    "JsonRpcNotification": {
      "type": "object",
      "required": [
        "jsonrpc",
        "method"
      ],
      "description": "JSON-RPC 2.0 notification (no id), e.g. notifications/initialized. Answered with HTTP 202 and no body.",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": [
            "2.0"
          ]
        },
        "method": {
          "type": "string",
          "pattern": "^notifications/"
        },
        "params": {
          "type": "object"
        },
        "id": {
          "not": {},
          "description": "Notifications carry no id."
        }
      }
    },
    "JsonRpcRequest": {
      "type": "object",
      "required": [
        "jsonrpc",
        "id",
        "method"
      ],
      "description": "JSON-RPC 2.0 request. MCP methods include initialize, ping, tools/list and tools/call.",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": [
            "2.0"
          ]
        },
        "id": {
          "$ref": "#/$defs/JsonRpcId"
        },
        "method": {
          "type": "string"
        },
        "params": {
          "type": "object"
        }
      }
    }
  }
}