{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/notfair-co/json-schema/notfair-co-mcp-response-schema.json",
  "title": "McpResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/notfair-co-openapi.json#/components/schemas/McpResponse",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "const": "2.0"
        },
        "id": {
          "type": [
            "string",
            "integer"
          ]
        },
        "result": {
          "oneOf": [
            {
              "$ref": "#/$defs/InitializeResult"
            },
            {
              "$ref": "#/$defs/ToolListResult"
            },
            {
              "$ref": "#/$defs/CallToolResult"
            }
          ]
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ]
    },
    {
      "$ref": "#/$defs/RpcError"
    }
  ],
  "$defs": {
    "CallToolResult": {
      "type": "object",
      "properties": {
        "content": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "image",
                  "audio",
                  "resource",
                  "resource_link"
                ]
              },
              "text": {
                "type": "string"
              },
              "data": {
                "type": "string"
              },
              "mimeType": {
                "type": "string"
              },
              "resource": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "required": [
              "type"
            ]
          }
        },
        "structuredContent": {
          "type": "object",
          "additionalProperties": true
        },
        "isError": {
          "type": "boolean"
        }
      },
      "required": [
        "content"
      ]
    },
    "InitializeResult": {
      "type": "object",
      "properties": {
        "protocolVersion": {
          "type": "string"
        },
        "capabilities": {
          "type": "object",
          "additionalProperties": true
        },
        "serverInfo": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "version"
          ]
        },
        "instructions": {
          "type": "string"
        }
      },
      "required": [
        "protocolVersion",
        "capabilities",
        "serverInfo"
      ]
    },
    "RpcError": {
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "const": "2.0"
        },
        "id": {
          "type": [
            "string",
            "integer",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "data": {}
          },
          "required": [
            "code",
            "message"
          ]
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "error"
      ]
    },
    "Tool": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "inputSchema": {
          "type": "object",
          "additionalProperties": true
        },
        "outputSchema": {
          "type": "object",
          "additionalProperties": true
        },
        "annotations": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "readOnlyHint": {
              "type": "boolean"
            },
            "destructiveHint": {
              "type": "boolean"
            },
            "idempotentHint": {
              "type": "boolean"
            },
            "openWorldHint": {
              "type": "boolean"
            }
          },
          "required": []
        }
      },
      "required": [
        "name",
        "inputSchema"
      ]
    },
    "ToolListResult": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tool"
          }
        },
        "nextCursor": {
          "type": "string"
        }
      },
      "required": [
        "tools"
      ]
    }
  }
}