{
  "openapi": "3.1.0",
  "info": {
    "title": "Geoapify MCP List Place Categories Tool",
    "version": "0.1.0",
    "description": "OpenAPI specification for calling the Geoapify MCP list_place_categories tool through the JSON-RPC endpoint."
  },
  "servers": [
    {
      "url": "https://api.geoapify.com/v1"
    }
  ],
  "tags": [
    {
      "name": "MCP List Place Categories",
      "description": "Call the Geoapify MCP list_place_categories tool through the JSON-RPC endpoint."
    }
  ],
  "paths": {
    "/mcp": {
      "post": {
        "tags": [
          "MCP List Place Categories"
        ],
        "operationId": "callMcpListPlaceCategories",
        "summary": "Call the list_place_categories MCP tool",
        "description": "Call the list_place_categories MCP tool with a JSON-RPC tools/call request.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "required": true,
            "description": "Geoapify API key.",
            "schema": {
              "type": "string"
            },
            "example": "YOUR_API_KEY"
          }
        ],
        "requestBody": {
          "description": "JSON-RPC request body for the list_place_categories MCP tool.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPlaceCategoriesToolCallRequest"
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "list_place_categories",
                  "arguments": {}
                }
              },
              "examples": {
                "listPlaceCategories": {
                  "summary": "List place categories",
                  "description": "List the category values accepted by search_places.",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "list_place_categories",
                      "arguments": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response for the MCP tool call.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ToolCallResponse"
                    },
                    {
                      "$ref": "#/components/schemas/JsonRpcErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload or tool arguments."
          },
          "401": {
            "description": "Missing or invalid Geoapify API key."
          },
          "429": {
            "description": "Rate limit or quota exceeded."
          },
          "500": {
            "description": "Internal gateway error."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ListPlaceCategoriesToolCallRequest": {
        "type": "object",
        "description": "JSON-RPC tools/call request for the list_place_categories MCP tool.",
        "additionalProperties": false,
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "description": "JSON-RPC protocol version.",
            "const": "2.0"
          },
          "id": {
            "description": "Client-supplied JSON-RPC request id echoed in the response.",
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "description": "MCP method used to call a tool.",
            "const": "tools/call"
          },
          "params": {
            "description": "Tool call parameters for list_place_categories.",
            "$ref": "#/components/schemas/ListPlaceCategoriesToolCallParams"
          }
        },
        "examples": [
          {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "tools/call",
            "params": {
              "name": "list_place_categories",
              "arguments": {}
            }
          }
        ],
        "x-geoapify-mcp-tool": "list_place_categories",
        "x-geoapify-mcp-category": "Places",
        "x-geoapify-mcp-input-schema": "#/components/schemas/ListPlaceCategoriesInput",
        "x-geoapify-mcp-output-schema": "#/components/schemas/ListPlaceCategoriesOutput"
      },
      "JsonRpcId": {
        "description": "JSON-RPC request identifier. The server echoes this value in the response.",
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "ListPlaceCategoriesToolCallParams": {
        "type": "object",
        "description": "MCP tools/call params for list_place_categories.",
        "additionalProperties": false,
        "required": [
          "name",
          "arguments"
        ],
        "properties": {
          "name": {
            "description": "Registered MCP tool name.",
            "const": "list_place_categories"
          },
          "arguments": {
            "description": "Arguments validated by the list_place_categories input schema.",
            "$ref": "#/components/schemas/ListPlaceCategoriesInput"
          }
        }
      },
      "ListPlaceCategoriesInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {}
      },
      "ListPlaceCategoriesOutput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "count",
          "categories"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ToolCallResponse": {
        "type": "object",
        "description": "Successful JSON-RPC response for tools/call. Tool failures are returned with isError set to true.",
        "additionalProperties": false,
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "content",
              "isError"
            ],
            "properties": {
              "content": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "text"
                  ],
                  "properties": {
                    "type": {
                      "const": "text"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "structuredContent": {
                "description": "Structured output returned by the list_place_categories tool.",
                "$ref": "#/components/schemas/ListPlaceCategoriesOutput"
              },
              "isError": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "JsonRpcErrorResponse": {
        "type": "object",
        "description": "JSON-RPC error response returned for invalid requests or unknown methods.",
        "additionalProperties": false,
        "required": [
          "jsonrpc",
          "id",
          "error"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "error": {
            "$ref": "#/components/schemas/JsonRpcError"
          }
        }
      },
      "JsonRpcError": {
        "type": "object",
        "description": "JSON-RPC error object.",
        "additionalProperties": false,
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": true
        }
      }
    }
  }
}
