Function-Calling JSON Schema Builder

Build OpenAI/Anthropic tool/function JSON schemas with a visual editor.

Ad placeholder (leaderboard)

Function-calling JSON schema builder

Function calling (OpenAI) and tool use (Anthropic) both require you to describe your tools as JSON Schema. Writing that schema by hand is fiddly and easy to get subtly wrong — a missing required array or a mistyped property breaks the model’s ability to call your function. This builder gives you a form: name the function, add typed parameters, mark which are required, and copy clean, provider-ready JSON.

How it works

You define the function once. Each parameter has a name, a JSON Schema type, a description, and a required flag; string parameters can also carry an enum to restrict the allowed values. The tool assembles a standard JSON Schema parameters object — a type: "object" with a properties map and a required array — then wraps it in either the OpenAI { type: "function", function: {...} } envelope or the Anthropic { name, description, input_schema } shape. Switch formats with a toggle and copy.

Tips and notes

  • Descriptions are the prompt. The model reads them to decide when to call the tool and how to fill each field. Be specific about units, formats, and constraints.
  • Use enums to prevent invalid values. If a parameter has a fixed set of options, list them as an enum so the model cannot invent a value outside it.
  • Mark only truly mandatory fields required. Over-requiring forces the model to guess values it does not have, which causes bad calls.
  • Everything is local. Your schema never leaves the browser.
Ad placeholder (rectangle)