OpenAPI → LLM Tool Schema Converter

Turn OpenAPI endpoints into OpenAI or Anthropic tool definitions.

Paste an OpenAPI 3.x spec, pick the endpoints you want to expose, and generate properly formatted function-calling tool schemas for OpenAI or Anthropic. Merges path, query, and request-body parameters into a single JSON Schema with descriptions. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What OpenAPI version is supported?

OpenAPI 3.x JSON specs. Each operation's path parameters, query parameters, and JSON request-body schema are merged into a single parameters object for the tool.

Convert OpenAPI endpoints into LLM tools

The OpenAPI → LLM Tool Schema Converter takes an OpenAPI 3.x specification and produces ready-to-use function-calling tool definitions for OpenAI or Anthropic. Pick exactly the endpoints you want the model to be able to call, and the tool merges their parameters into a single JSON Schema per operation.

How it works

The converter scans paths for every operation (GET, POST, PUT, PATCH, DELETE). For each, it collects path and query parameters and, when present, the application/json request-body schema, merging them into one properties object with a combined required list. Parameter description fields are preserved so the model understands each argument. The result is emitted in OpenAI’s { type: "function", function: {...} } shape or Anthropic’s { name, description, input_schema } shape, depending on your selection.

What the two output formats look like

Given a GET /orders/{orderId} operation with a path parameter and a query parameter, the converter produces:

OpenAI format:

{
  "type": "function",
  "function": {
    "name": "getOrder",
    "description": "Retrieve a specific order by its ID.",
    "parameters": {
      "type": "object",
      "properties": {
        "orderId": {
          "type": "string",
          "description": "The unique identifier of the order."
        },
        "include_items": {
          "type": "boolean",
          "description": "Whether to include line items in the response."
        }
      },
      "required": ["orderId"]
    }
  }
}

Anthropic format:

{
  "name": "getOrder",
  "description": "Retrieve a specific order by its ID.",
  "input_schema": {
    "type": "object",
    "properties": {
      "orderId": { "type": "string", "description": "The unique identifier of the order." },
      "include_items": { "type": "boolean", "description": "Whether to include line items." }
    },
    "required": ["orderId"]
  }
}

The only structural differences are the top-level wrapper and the parameters vs input_schema key name — the inner JSON Schema is identical.

Workflow: from API spec to working agent

  1. Export your OpenAPI spec from your API framework (FastAPI, NestJS, Django REST, etc.) or download it from your provider.
  2. Paste it here and let the converter list every available operation.
  3. Select only what the model needs. An agent that can read orders does not need the delete-account endpoint. Fewer tools = more reliable calling.
  4. Copy the output array into your function-calling setup or MCP server configuration.
  5. Improve descriptions. Auto-generated description fields from most frameworks say things like “Get order.” That is not enough for a model. Rewrite them to explain when to call the tool and what the result is.

Tips and notes

  • Expose only the endpoints the model genuinely needs — fewer, well-described tools beat a giant menu.
  • Make sure your OpenAPI parameter description fields are written for a model, not just a human reader.
  • If an operation lacks an operationId, give it one in your spec so the generated tool name is stable.
  • Request body schemas that use $ref references need to be resolved (dereferenced) in your spec before pasting. Most API frameworks can export a “bundled” or “dereferenced” version.
  • Everything runs locally; nothing you paste leaves your browser.