OpenAPI Spec to LLM Function Calling Schema Generator

OpenAPI Spec to LLM Function Calling Schema Generator
Copied!
Function calling JSON (tools array)

OpenAPI to Function Calling — Turn Swagger into LLM Tools

OpenAPI to Function Calling converts an OpenAPI (Swagger) spec into a JSON structure suitable for LLM function/tool calling. Each path and method becomes a tool with a name, description, and parameters derived from the API schema.

Why Use This Tool?

  • Faster integration: Skip hand-writing tool schemas for every endpoint.
  • Single source: Keep your API spec as the source of truth; regenerate tools when the API changes.
  • Standard format: Output follows common function-calling schemas (e.g. OpenAI tools).

Key Features

  • Paths and methods: Reads paths and operations from the spec.
  • Parameters: Maps query/path parameters into tool parameters.
  • Names and descriptions: Uses operationId, summary, and description when present.
  • Copy: One-click copy of the generated JSON.

How it Works

The tool parses the pasted OpenAPI JSON, iterates over paths and HTTP methods, and builds a list of tools. Each tool has a name (from operationId or derived), a description, and a parameters object. Request body schemas are hinted as a body parameter. The result is a JSON object with a tools array.

Try OpenAPI to Function Calling

Paste your OpenAPI or Swagger JSON above. The function-calling JSON appears below. Copy it into your LLM client or backend.