LLM Tool & Function Schema Converter — OpenAI, Claude, Gemini, MCP

LLM Tool & Function Schema Converter

Convert tool and function calling definitions between OpenAI, Anthropic, Gemini, MCP, Vercel AI SDK, TypeScript, and Pydantic.

Free online Multi-LLM Tool & Function Calling Schema Converter. Convert function and tool definitions across OpenAI Function Calling, Anthropic Claude Tool Use, Google Gemini Function Declarations, Model Context Protocol (MCP), Vercel AI SDK (Zod), TypeScript interfaces, and Python Pydantic models. Features auto-format detection, schema repair, strict mode controls, and multi-tab instant code generation. Runs 100% client-side in your browser — your schemas stay private.

Keywords: llm tool converter, openai function calling, anthropic tool schema, gemini function declaration, mcp schema converter, vercel ai sdk tool, function calling converter, openai to claude tool, mcp to openai, pydantic tool args, typescript tool args

Tags: llm, openai, anthropic, gemini, mcp, vercel-ai, typescript, pydantic, converter, ai

Browse all 41 Developer Tools tools →

LLM Tool & Function Schema Converter is also known as: LLM Function Calling Converter, OpenAI to Anthropic Tool Converter, AI Tool Schema Converter.

How to LLM Tool & Function Schema Converter Online

  1. Paste or upload your tool definition, function schema, or JSON Schema into the left editor (supports OpenAI, Anthropic, Gemini, MCP, and raw JSON Schema formats).

  2. The engine automatically detects the source format and displays an auto-detection badge (e.g. OpenAI Function, Anthropic Tool, or MCP). You can also manually specify the input format using the dropdown.

  3. Toggle Strict Mode on or off to control whether additionalProperties: false is enforced and all object properties are mandated in the required array.

  4. Select your target format tab on the right: OpenAI Function, Anthropic Claude Tool, Google Gemini, Model Context Protocol (MCP), Vercel AI SDK (Zod), TypeScript Interface, or Python Pydantic Model.

  5. Review the generated code or JSON definition with full syntax highlighting, structural property counts, and nesting depth statistics.

  6. Click Copy (⌘⇧C), Download, or Share to export your converted tool definition directly into your codebase, prompt template, or agent workflow.

LLM Tool & Function Schema Converter Features

  • 6-Way Multi-LLM Bidirectional Conversion: Convert function and tool definitions seamlessly across OpenAI, Anthropic Claude, Google Gemini, Model Context Protocol (MCP), Vercel AI SDK, TypeScript, and Pydantic.

  • Intelligent Format Auto-Detection: Automatically identifies schema dialect from unique structural signatures (such as input_schema for Claude, inputSchema for MCP, or function_declarations for Gemini).

  • OpenAI Structured Outputs & Strict Mode: Full support for OpenAI { type: "function", function: { ... }, strict: true } format with additionalProperties: false and exhaustive required array population.

  • Anthropic Claude Tool Standard: Generates standard Anthropic { name, description, input_schema } definitions compatible with Claude 3.5 Sonnet, Claude 3 Opus, and Claude 3.7 models.

  • Google Gemini Function Declarations: Formats schemas into Gemini function_declarations with uppercase OBJECT parameters and required argument constraints for Gemini 1.5 and 2.0 Flash/Pro.

  • Model Context Protocol (MCP 2024-11) Compliance: Emits camelCase inputSchema structures adhering to Anthropic open-source MCP tool specification for Claude Desktop and Cursor.

  • Vercel AI SDK (Zod) Code Generation: Converts JSON Schemas into executable TypeScript tool({ parameters: z.object({ ... }) }) code blocks with rich type validation, descriptions, and default values.

  • TypeScript Interface Output: Generates strongly-typed export interface ToolArgs { ... } declarations with nested object types, string literal unions, array types, and JSDoc comment blocks.

  • Python Pydantic (v2) BaseModel Emitter: Creates production-ready class ToolArgs(BaseModel) Python code utilizing Field(..., description="...") and Optional[List[...]] type annotations.

  • Schema Normalization & Automatic Repair: Adds missing root type: "object" declarations, purges nonexistent keys from the required array, and sanitizes identifiers with non-standard characters.

  • Nested Object & Array Traversal: Recursively processes deeply nested schemas, array items, enum string lists, default values, and nullable union types up to 10 levels deep.

  • Real-Time Live Debounced Conversion: Converts schemas instantly as you type with zero lag, displaying property counts, required argument tallies, and max nesting depth.

  • Comprehensive REST API Endpoint: Programmatically convert schemas in CI/CD pipelines via GET and POST requests at /api/tools/llm-tool-converter.

  • Air-Gapped 100% Client-Side Privacy: All parsing and code generation executes strictly in your browser. Proprietary tool contracts, database schemas, and private APIs never touch a remote server.

Supported Formats & Dialects

The LLM Tool & Function Schema Converter supports 7 syntax formats and dialects for accurate parsing and processing.

OpenAI Function Calling (GPT-4o, o1, o3-mini)
Standard OpenAI tool schema envelope { type: "function", function: { name, description, parameters, strict: true } } designed for structured outputs and guaranteed JSON conformance.
Anthropic Claude Tool Use (Claude 3.5, 3.7)
Anthropic tool calling specification using { name, description, input_schema: { type: "object", properties, required } } format for Claude client libraries and API endpoints.
Google Gemini Function Declarations
Google Generative AI function calling specification wrapping tools in { function_declarations: [{ name, description, parameters: { type: "OBJECT", ... } }] } for Gemini 1.5/2.0.
Model Context Protocol (MCP 2024-11)
Standardized open-source tool specification for MCP servers and host clients (Cursor, Claude Desktop) utilizing { name, description, inputSchema: { type: "object", ... } }.
Vercel AI SDK (Zod Schema)
Modern TypeScript AI SDK format exporting tool({ description, parameters: z.object({ ... }), execute: async (args) => { ... } }) using Zod runtime validation.
TypeScript Interface
Native TypeScript type definition exporting interface <Name>Args { ... } with JSDoc descriptions and optional properties for static type checking in Node.js and Deno.
Python Pydantic (BaseModel)
Python 3.10+ Pydantic model definition class <Name>Args(BaseModel) with Field() metadata, Literal enums, and typing annotations for LangChain, LlamaIndex, and AutoGen.
AI Model Token Pricing

Explore Full AI Model Pricing Directory

Compare per-token rates, prompt caching discounts, and context windows across leading LLMs (GPT-4o, Claude 3.5 Sonnet, Gemini 2.5 Flash, DeepSeek, and more) in our verified catalog.

Frequently Asked Questions

How do I convert an OpenAI function definition to an Anthropic Claude tool?
Paste your OpenAI function JSON (either the full { type: "function", function: { ... } } wrapper or the inner function object) into the input editor. The converter detects the OpenAI format and populates the Anthropic tab with the equivalent { name, description, input_schema } structure, mapping parameters directly to input_schema.
What is the difference between OpenAI Function Calling and Anthropic Claude Tool Use schemas?
OpenAI nests function metadata inside a "function" key with a "parameters" object and supports an explicit "strict: true" flag for structured outputs. Anthropic uses top-level "name" and "description" keys with an "input_schema" key containing the JSON Schema Draft-07 object. This converter handles the key transformation and dialect adjustments automatically.
How does Model Context Protocol (MCP) tool schema differ from OpenAI and Claude?
Model Context Protocol (MCP 2024-11) uses camelCase naming conventions: "inputSchema" instead of Anthropic's snake_case "input_schema" or OpenAI's "parameters". MCP also strictly requires tool names to match ^[a-zA-Z0-9_-]+$ and the inputSchema to be a root object type. The converter validates and normalizes these constraints.
How do I use the generated Vercel AI SDK Zod code in Next.js or Node.js?
Select the "Vercel AI SDK" tab, copy the generated code, and paste it into your AI route handler or actions file. The output imports { tool } from "ai" and { z } from "zod", constructing a ready-to-use tool instance with type-safe parameters and an async execute() function stub.
What does Strict Mode do when converting to OpenAI format?
When Strict Mode is enabled, OpenAI requires two conditions: (1) "additionalProperties: false" must be explicitly defined on all object schemas, and (2) every property listed in the "properties" dictionary must be included in the "required" array. The converter automatically populates the required array and sets additionalProperties: false when strict mode is active.
How does Google Gemini format function declarations?
Google Gemini expects tool definitions inside a "function_declarations" array. The parameters object requires "type: 'OBJECT'" (often capitalized in Google documentation) with standard properties and required arrays. The converter wraps your tool in this format for use with the Google Gen AI SDK (@google/genai).
Can I generate Python Pydantic models from my LLM tool schema?
Yes. Switch to the "Pydantic" tab to generate a Python 3.10+ Pydantic BaseModel class with Field() descriptions, Optional[] typing for non-required arguments, and Literal[] types for enum values. This is ideal for Python frameworks like LangChain, CrewAI, AutoGen, and FastAPI.
Does this tool support nested objects and arrays of objects?
Yes. The converter recursively parses nested objects, arrays with typed items, string literal enums, numbers, integers, booleans, and default values across all output formats, including nested Zod schemas, TypeScript interfaces, and Pydantic models.
Is my proprietary tool schema and API definition private?
Yes. All parsing, canonical AST transformation, and code generation run 100% locally in your browser using JavaScript. No schema content or data payload is ever sent to an external server or logged in telemetry.
How can I convert LLM tool definitions programmatically via API?
You can send a POST request to /api/tools/llm-tool-converter with a JSON body: { "input": "<your_json_string>", "sourceFormat": "auto", "strictMode": true }. The endpoint returns the detected format, canonical AST representation, and generated outputs for all target formats.

Developer Reference & Learning Hubs