LLM Tool Definition Builder

Paste the JSON Schema for a function and get the tool definition JSON for OpenAI Chat Completions, OpenAI Responses and Anthropic, with optional strict mode.

Use the tool

Why this tool exists

The same function tool is described slightly differently by each provider. OpenAI Chat nests everything under a function key, the Responses API puts the fields at the top level, and Anthropic uses input_schema instead of parameters. Getting this wrong gives a 400 error with a message that is not always helpful.

OpenAI strict mode adds more rules: every property must be listed as required and additionalProperties must be false, so optional fields become nullable. This builder applies that transformation for the OpenAI outputs and leaves the Anthropic schema as you wrote it. Check the result against each provider documentation, as the formats change over time.

How to use it

  1. Paste a JSON Schema whose top level is an object into the input.
  2. Enter the tool name and a clear description, and choose a target or All.
  3. Copy the JSON for your provider, and keep strict mode ticked for OpenAI if you want it.

Frequently asked questions

What does strict mode change?

For OpenAI it lists all properties as required, sets additionalProperties to false and turns optional fields into a type plus null. The Anthropic output is left unchanged.

Why must the schema be an object?

Function arguments are passed as a single JSON object, so the top-level schema needs type object. The tool stops with an error otherwise.

Are tool names restricted?

Yes. It accepts 1 to 64 characters of letters, digits, underscores and hyphens, which fits the rules of both providers.

Does it call any API?

No. It only reshapes JSON in your browser. You still need to send the definition in a request to the provider yourself.