← Docs · Markdown · Home

Canonical MCP payloads

Per-service contracts: JSON-RPC envelope, each tool’s inputSchema (required fields, types, enums, defaults), and the handler’s structuredContent output schema. No sample IDs or invented query strings.

Endpoint: POST https://mcp.glc-rag.hu/mcp with Authorization: Bearer mcp_….

Input contracts are the live ToolSpec.input_schema. Output contracts live in each package’s payloads.py (OUTPUT_SCHEMAS), separate from handlers.

Wire format

Request schema:

{
  "type": "object",
  "required": [
    "jsonrpc",
    "id",
    "method",
    "params"
  ],
  "properties": {
    "jsonrpc": {
      "type": "string",
      "const": "2.0"
    },
    "id": {
      "type": [
        "integer",
        "string"
      ]
    },
    "method": {
      "type": "string",
      "const": "tools/call"
    },
    "params": {
      "type": "object",
      "required": [
        "name",
        "arguments"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Tool name"
        },
        "arguments": {
          "type": "object"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Success/error RPC result (tool output is result.structuredContent):

{
  "type": "object",
  "required": [
    "jsonrpc",
    "id",
    "result"
  ],
  "properties": {
    "jsonrpc": {
      "type": "string",
      "const": "2.0"
    },
    "id": {
      "type": [
        "integer",
        "string"
      ]
    },
    "result": {
      "type": "object",
      "required": [
        "content",
        "structuredContent",
        "isError"
      ],
      "properties": {
        "content": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "text"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "text"
              },
              "text": {
                "type": "string",
                "description": "JSON serialization of structuredContent"
              }
            }
          }
        },
        "structuredContent": {
          "type": "object",
          "description": "Tool handler output (see per-tool output schema)"
        },
        "isError": {
          "type": "boolean",
          "description": "True when structuredContent.is_error is true"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Handler error object (when validation or the tool fails):

{
  "type": "object",
  "required": [
    "error",
    "is_error"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "is_error": {
      "type": "boolean",
      "const": true
    }
  },
  "additionalProperties": true
}

Billed tools may add optional credits_charged and credits_balance on structuredContent. Free *_status tools do not.

Services