Tools

Function Calling Schema Builder

Build tool definitions for OpenAI, Claude and Gemini

Parameters

How to build a tool (function calling) schema

  1. Name the function, using letters, digits and underscores, for example get_weather or create_ticket.
  2. Write a description that tells the model what the tool does and when to call it. This text matters more than anything else for reliable tool use.
  3. Add parameters with a type, a description, optional allowed values and whether each is required.
  4. Choose the output format, OpenAI, Anthropic, Gemini or plain JSON Schema, and copy it into your code. Use Import JSON to edit an existing definition or convert it between providers.

Tips for reliable tool calls

Function calling, or tool use, lets a language model ask your code to do something, such as look up an order, search a database or book a meeting, by returning structured arguments that match a JSON Schema. Each provider wraps the same schema slightly differently: OpenAI nests it under function.parameters, Anthropic uses input_schema, and Gemini uses uppercase type names in functionDeclarations. This builder writes all of them from one definition.

Good descriptions say what a parameter means and what format it expects, with an example, such as "ISO date, e.g. 2025-03-31". Use enums when only a few values are valid, keep the number of parameters small, and mark only truly essential ones as required. OpenAI's strict mode guarantees that arguments match the schema exactly; it requires every property to be listed as required, so optional ones are given a null type, which this tool does for you. Always validate arguments in your own code before acting on them. Nothing you type leaves the browser.

What is the difference between OpenAI and Anthropic tool formats?

The JSON Schema inside is the same. OpenAI wraps it as {type: "function", function: {name, description, parameters}}; Anthropic uses {name, description, input_schema}.

What does strict mode do?

It makes OpenAI models always return arguments that exactly match the schema, with no extra or missing fields.

How many tools can I give a model?

Providers allow dozens to over a hundred, but accuracy drops as the list grows. Keep it to the tools needed for the task.