JSON Schema
JSON Schema is a standard vocabulary for describing the shape of JSON data — its types, required fields, and allowed values. In agentic AI, it's how you declare a tool's parameters so the model fills them correctly and your runtime can validate them.
- Glossary
- Updated 2026
JSON Schema is an open standard for describing what a piece of JSON is allowed to look like. Rather than explaining a data format in a comment or a README, you write it down as data itself: an object that says which fields exist, what type each one is, which are required, and what values are valid. Any compliant validator can then check real data against that description — no bespoke parsing code required.
Why it matters for agents: when you expose a tool to an AI agent, you declare the tool's parameters as a JSON Schema. That schema does double duty. It travels alongside the prompt so the model knows precisely which arguments to emit and in what shape, and your runtime uses the very same schema to validate the model's function call before executing it. This validated handoff is what turns a hopeful string into dependable software — the foundation tool calling is built on.
Concrete example: a get_weather tool might declare parameters as { "type": "object", "properties": { "city": { "type": "string" }, "units": { "enum": ["c", "f"] } }, "required": ["city"] }. The model must return a city string and may only pick c or f for units — anything else fails validation and is rejected or retried instead of run blindly.
The practical lesson: tighter schemas produce better agent behavior. Use enum instead of free text where the choices are known, mark required fields, add sensible numeric bounds and per-field descriptions, and keep objects shallow. The clearer the contract, the more reliably the model fills it. For the full picture — schemas, parallel calls, and error handling — read the complete function calling guide.
Concepts that connect to JSON Schema
- Function calling
- The mechanism where a model emits a structured call whose arguments match a JSON Schema you declared. Read more →
- Tool calling
- The broader capability of acting on the world, using schema-declared tools. Read more →
- Model Context Protocol (MCP)
- A standard for connecting agents to tools — whose tool definitions are described with JSON Schema. Read more →
JSON Schema FAQ
JSON Schema is an open standard vocabulary for describing the shape of JSON data — the fields an object may contain, each field's type, which fields are required, and the allowed values. Instead of documenting a data format in prose, you declare it as a machine-readable schema that both humans and software can read, and that validators can check data against automatically.
Declare a schema, ship a reliable agent
Give your agent well-typed tools and let the model fill them with confidence. Free to start — no credit card required.