AI & LLM Developer Tools

Function Calling Schema Builder

Define a tool once - name, description, parameters, required fields and examples - validate it, and export the function or tool definition for OpenAI, Anthropic and Gemini.

  • Three provider definitions
  • Validation findings
  • Example arguments check
Runs in your browser

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics.

Tool schema workspace

1 The tool

Examples:

Letters, digits, underscores and dashes; at most 64 characters works everywhere.

What it does, when to use it and when not to, and what it returns.

Parameters defined with

One per line: order_id: string "The order number, e.g. A-1042". ? after a name = optional; enum(a|b); [] = list; indent under object.

2 Example calls (optional)

3 Definitions

Describe a tool or load an example.

What the Function Calling Schema Builder does

This builder defines a tool once - its name, description and parameters - and produces the function or tool definition in the exact shape each API expects: OpenAI Responses and Chat Completions, Anthropic Messages and Gemini generateContent. It checks the name against each provider's naming rule, the parameter schema against their documented restrictions, and your example calls against the schema.

Everything happens in your browser. Nothing is called, so it is safe to paste definitions for internal tools, and the output is plain JSON you can drop into your code. The checks say which provider each rule comes from, because the same definition can pass on one API and be rejected by another.

How to use it

  1. Give the tool a name made of letters, digits, underscores or dashes, and a description that says what it does, when to use it and when not to, and what it returns.
  2. List the parameters one per line, such as order_id: string "Order number, e.g. A-1042". Add ? after a name for optional parameters, use enum(a|b) for fixed choices and indent under object for nested arguments. Or switch to JSON Schema and paste your own.
  3. Add a few example calls as a JSON array of argument objects - including one you expect to be rejected - to check the schema does what you mean.
  4. Build the definitions. Fix problems for the providers you use, then copy each provider's definition from its tab or download them all.

Reading the results

Problems are rules the provider documents: an invalid name, additionalProperties not false in strict mode, or keywords Anthropic does not support (pattern, minimum, maximum, minLength, maxLength, maxItems). Warnings are keywords a provider does not document and may ignore; enforce those in the code that runs the tool.

The OpenAI definitions use strict mode, so optional parameters are listed as required with null allowed - your handler should treat null as not supplied. The Anthropic definition keeps optional parameters optional and includes your examples as input_examples when you give any.

Example-call results tell you whether each argument object matches the schema. Anthropic rejects a request whose input_examples do not validate, so the page warns before you send one.

Worked example: an order-status lookup tool

Tool get_order_status, with a four-sentence description and two parameters: order_id, a string with the pattern ^[A-Z]-\d{4,6}$, and an optional boolean include_items. Three example calls: A-1042, B-993311 with items, and 1042.

OpenAI: no problems; the strict definition lists both parameters as required, with include_items typed ["boolean", "null"]. Anthropic: one problem - pattern is not supported - so remove it for Claude and validate the order number in your handler. Gemini: a warning that pattern is not among its documented keywords.

The first two example calls pass. The third, 1042, fails the pattern: the schema is doing its job, but if you kept the pattern and sent that example to Claude as an input_example, the request would be rejected.

Descriptions do most of the work

Models choose between tools and fill arguments almost entirely from the names and descriptions you give them. Anthropic's guidance is to write at least three or four sentences per tool, covering what it does, when it should and should not be used, what each parameter means and what comes back. The builder warns when a description is under twelve words and lists parameters with no description.

Prefer fewer, well-described tools over many narrow ones, use enums wherever a parameter has fixed values, and namespace names by service (billing_get_invoice) once you have more than a handful. Always validate arguments again in your own code: a schema narrows what the model sends; it does not make it safe to execute.

Limitations: what the result does not prove

  • Rules reflect each provider's documentation as reviewed on the date above. APIs change; confirm unusual schemas against the live API.
  • Gemini's naming rule is checked conservatively (letters, digits, underscores, dots, colons, dashes, up to 64 characters, starting with a letter or underscore); Google's current reference is authoritative.
  • It builds definitions, not the code that runs the tool, and it cannot tell whether a model will choose the tool at the right moment - test that with real prompts.
  • Model names in the request are yours to add; the definitions are model-independent.

Privacy: where your data goes

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.

Standards and sources

Frequently asked questions

What is the difference between OpenAI, Claude and Gemini tool definitions?

The schema inside is JSON Schema in all three, but the wrapper differs: OpenAI uses type: function with parameters (nested under function in Chat Completions), Anthropic uses name, description and input_schema, and Gemini groups declarations under functionDeclarations with parameters or parametersJsonSchema.

What characters can a function name contain?

OpenAI allows letters, digits, underscores and dashes up to 64 characters. Anthropic's tool names must match ^[a-zA-Z0-9_-]{1,128}$. Keeping to letters, digits and underscores under 64 characters works on all three providers.

Should I turn on strict mode for tools?

Usually yes when code consumes the arguments. OpenAI's strict: true and Anthropic's strict tool use make the model's arguments follow your schema exactly, at the cost of some schema restrictions - every field required on OpenAI, no numeric or length bounds on Anthropic. The checks show which of your keywords those restrictions affect.

What are input_examples in Claude tool definitions?

An optional list of example argument objects that Anthropic adds to the prompt to show Claude how to call a complex tool. Each must validate against the tool's input schema or the request fails with a 400 error, which is why the builder validates your examples first.

Does a valid schema make it safe to run the tool?

No. The schema limits the shape of the arguments, not their intent: a valid delete_file call can still name the wrong file. Treat arguments as untrusted input, check permissions in your handler, and require confirmation for anything destructive.

How many tools should I give a model?

As few as the task needs. Every definition costs input tokens on each request and adds a choice the model can get wrong. Consolidate related actions into one tool with an action parameter where it reads naturally, and load rarely used tools only when they are needed.

Last reviewed by the A2Z.Tools team against the sources listed above.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.