Validate before the API rejects it
A malformed tool schema is a common, frustrating failure: the OpenAI API returns a 400, or worse, the model fills arguments badly because the schema is ambiguous. Paste your tool definition here and get an instant checklist — name format, required fields, parameter types, description quality, and nesting depth — so you catch problems before you ship.
How it works
The validator parses your JSON and runs a set of rules drawn from OpenAI’s
function-calling specification. It accepts either a full tool object
({ "type": "function", "function": { … } }) or just the function definition.
It checks that name is present and uses only allowed characters, that
description exists and isn’t excessively long, that parameters is a proper
JSON Schema object with a properties map, that each property declares a type,
and that nesting stays within a practical depth.
Tips
- Always describe each parameter. The model uses descriptions to decide what to put in each field; vague schemas produce vague calls.
- Mark required fields explicitly in the
requiredarray — otherwise the model may omit them. - Keep it shallow. Flatter schemas with clear enums are filled far more reliably than deeply nested ones.