home/glossary/JSON Schema for Tools
Tool Design and Contracts

JSON Schema for Tools

definition

JSON Schema is the formal specification language used to define the structure, types, and constraints of tool parameters that agents pass to functions. It serves as the contract between the model's output and the tool's input — specifying required fields, types (string, number, array), allowed values (enums), and validation rules that the model must satisfy when generating tool call arguments.

JSON Schema is the formal specification language used to define the structure, types, and constraints of tool parameters that agents pass to functions. It serves as the contract between the model's output and the tool's input — specifying required fields, types (string, number, array), allowed values (enums), and validation rules that the model must satisfy when generating tool call arguments. Every major LLM provider uses JSON Schema as the standard for defining tool interfaces, making it the universal language for describing what an agent can do. Understanding JSON Schema is essential because poorly specified schemas lead to malformed tool calls, while well-constrained schemas with precise descriptions and strict typing dramatically improve tool-use reliability. This concept connects to function calling for the mechanism that consumes JSON schemas, structured output for ensuring model responses match expected formats, and tool definition patterns for best practices in schema design.