Tool Design and Contracts
JSON Schema for Tools
JSON Schema is the formal specification language used to define the structure, types, and constraints of the parameters that agents pass to tools, serving as the contract between the model's output and the tool's input. Every major large language model (LLM) provider uses JSON Schema as the standard for defining tool interfaces, making it the universal language for describing what an agent can do. Poorly specified schemas lead to malformed tool calls, while well-constrained schemas with precise descriptions and strict typing directly improve tool-use reliability.
subtopics
connected to
resources
JSON Schemajson-schema.orgThe official specification and documentation for JSON Schema (json-schema.org)OpenAI: Structured Outputsplatform.openai.comHow OpenAI uses JSON Schema for guaranteed structured output formats (platform.openai.com)Anthropic: Tool Use Schemasdocs.anthropic.comHow Claude uses JSON Schema for tool input definition (docs.anthropic.com)Understanding JSON Schemajson-schema.orgComprehensive tutorial for learning JSON Schema from basics to advanced patterns (json-schema.org)