Tool call & MCP schema builder

Describe your tool's parameters once and get a strictly valid function calling JSON Schema in every format that matters — bare JSON Schema, OpenAI function calling, Anthropic tools, and MCP. Free, no signup.

What function calling actually is

Function calling — also called tool calling — lets a model reach outside its own text. Instead of answering straight away, the model can return a structured call: the name of a tool you defined plus a JSON object of arguments. Your code runs that call (query a database, hit a payments API, look up an order) and hands the result back, so the model can finish its response with real data. The model never executes anything itself; it only decides which tool to call and what arguments to pass. The schema you supply is what makes that possible — it tells the model the exact shape of the arguments each tool expects, so the call it produces is something your code can actually run.

How the tool JSON Schema works

A tool definition has three parts: a name, a description, and parameters expressed as a JSON Schema object. The parameters object lists each argument under properties, gives every one a type (string, number, boolean, array, object), a short description, and — where the value is a fixed set of options — an enum. A required array names which parameters are mandatory. The descriptions are not decoration: the model reads the tool description to decide when to call, and each parameter description to decide how to fill it in. Types, enums, and the required array constrain what the model is allowed to produce, which is what turns a free-form guess into a call your code can trust.

One schema, four wrappers

Every provider describes tools with the same core: a JSON Schema object listing your parameters. What differs is the envelope. OpenAI wraps it as function.parameters inside a type: "function" object, Anthropic calls it input_schema, and an MCP tool schema uses camel-cased inputSchema in its tools/list response. Because the parameters object itself is identical JSON Schema across all three, you can define it once and re-wrap it — which is exactly what this builder does, generating all four from a single definition so there is nothing to hand-port.

Best practices and common mistakes

The classic mistakes are structural, not syntactic. Forgetting the requiredarray makes every parameter optional, so the model happily omits the one argument your code depends on. Describing a fixed set of options in prose ("must be celsius or fahrenheit") instead of a proper enuminvites free-form values you then have to re-validate. Vague names and vague descriptions are the top cause of bad tool calls, because the description is the model's only documentation. The fixes are simple: write a clear description for the tool and each parameter, mark required fields, use enums to constrain choices, keep parameters flat and explicitly typed, and avoid ambiguous names that make two tools look interchangeable. This builder keeps each schema strictly valid — enums become { type: "string", enum: [...] }, lists become typed arrays, and the required array is always present.

Frequently asked questions

What is function calling / tool calling?
Function calling (also called tool calling) lets a model do more than write text — instead of answering directly, it returns a structured request to run one of the tools you defined: a tool name plus a JSON object of arguments. Your code executes that call (query a database, hit an API, look up an order) and feeds the result back so the model can finish its answer. The model never runs anything itself; it only proposes the call. The schema you provide tells the model which tools exist and the exact shape of the arguments each one expects.
What JSON Schema do OpenAI and Anthropic use for tools?
Both describe a tool with the same core: a name, a natural-language description, and a JSON Schema object listing the parameters (properties with types, a required array, and optional enums). The difference is only the envelope. OpenAI nests the schema under a function object as function.parameters; Anthropic puts it in a field named input_schema on each tool. The parameters object itself — properties, types, required, enum — is identical JSON Schema in both, which is why you can define it once and re-wrap it.
What is an MCP tool schema?
MCP (Model Context Protocol) is an open standard for connecting models to external tools and data through a server. When a client asks an MCP server what it can do, each tool it returns carries a name, a description, and an inputSchema — again a plain JSON Schema object describing the arguments. So an MCP tool definition shares the same JSON-Schema core as OpenAI and Anthropic tools; it just travels inside MCP's own tools/list response and uses the camel-cased inputSchema field.
Why does the tool description matter?
The description is the only documentation the model reads to decide when to reach for a tool and how to fill in its arguments. A vague description ("gets data") leaves the model guessing, so it calls the wrong tool, calls at the wrong time, or invents argument values. A precise one — what the tool does, when to use it, what each parameter means, and what units or formats it expects — is the single highest-leverage fix for unreliable tool calls. Per-parameter descriptions matter for the same reason.
How do I make a model call the right tool?
Give each tool a clear, distinct name and a description that states exactly when to use it, so overlapping tools do not compete. Constrain arguments with types, an accurate required array, and enums for fixed option sets, so the model cannot supply malformed input. Keep parameters flat and unambiguously named. If you have many similar tools, consolidate them or split by intent — the fewer the plausible-but-wrong choices, the more reliably the model picks correctly.
Do OpenAI, Anthropic, and MCP schemas differ?
Only at the edges. All three build on the same JSON Schema parameters object, so your types, required array, and enums carry over unchanged. What differs is the wrapper: OpenAI's function.parameters, Anthropic's input_schema, and MCP's inputSchema. Hand-porting between those envelopes is where typos and dropped required arrays sneak in, which is exactly what this builder eliminates by generating all of them from one definition.
Is this tool schema builder free?
Yes — it runs entirely in your browser, needs no signup, and sends nothing to a server. Define your parameters once and copy valid JSON Schema for OpenAI function calling, Anthropic tools, and MCP.

Related tools: LLM cost calculator (price a tool-using agent's token spend), context window comparison (count tokens and check what fits), and the full free LLM tools hub.

More free tools

  • LLM price comparison Live table of every model's API prices — sort, filter, and cost out your own request size.
  • LLM cost calculator Estimate per-request, daily, and monthly spend from token counts and request volume.
  • RAG cost calculator Full pipeline costs — embeddings, vector storage, and generation — from corpus size and query volume.
  • RAG chunking visualizer Paste a document and watch chunk size, overlap, and strategy change the chunks before you embed.
  • LLM context window comparison Count the tokens in any text and check which models it fits, against live context windows.
  • AI chatbot ROI calculator Turn ticket volume, handle time, and deflection rate into monthly support savings and ROI.