JSON Schema
A JSON-based vocabulary for describing the shape, types, and constraints of JSON documents.
Definition
JSON Schema declares the structure a JSON document must conform to: types, required fields, enums, regex patterns, and nested objects. It powers Pydantic models, OpenAPI specs, MCP tool definitions, and Anthropic and OpenAI structured-output modes. A JSON Schema doubles as both validator (reject malformed input) and contract documentation.