JSON Schema
JSON Schema is a declarative specification language for describing and validating the structure of JSON data, itself written in JSON format. It defines rules covering data types, property constraints, required fields, and enumerated values to validate and document JSON data. JSON Schema is widely used in API design, configuration file validation, form validation, and automated code generation, serving as a key tool for ensuring interoperability and data consistency.
Core Facts
Function Calling (Tool Use) is a standardized mechanism for large models to invoke external tools, where developers pre-declare tool names, descriptions, and parameter schemas, and the model autonomously determines when to make a call.
Each tool in MCP has a strict JSON Schema description, including the name, functional description, and parameter specifications
The core mechanism of Function Calling is that developers describe external function signatures in JSON Schema format, and the model outputs structured JSON invocation instructions that conform to the schema specification.
Timeline (last 90 days)
Compared with JSON Schema or YAML configuration, Markdown allows natural-language explanations, counterexamples and example code to be embedded in descriptions, making it better suited to expressing fuzzy rules such as "when to trigger, how to execute, and what to avoid."
Adding strict JSON Schema validation at vLLM's parsing layer can catch format errors in tool-call parameters.
For high-frequency tools, it is recommended to precompile the schema validator to reduce runtime overhead.
In the Tool Calling mechanism, AI models generate a JSON Schema to describe the function names and parameters to be called, thereby avoiding hallucinated execution.
Tool interfaces should use JSON schema with additionalProperties: false, and also register risk, timeout, retry, idempotency and approval requirements.
The skills field of the Agent Card is mostly natural language descriptions plus a few examples, lacking formal constraints like JSON Schema on parameter types, required fields and value ranges, which is the main obstacle when wrapping A2A agents as MCP tools.
The project uses JSON Schema to force the large model to output structured data containing the three fields script, image_prompt and video_prompt, with additionalProperties: false set.
Structured output lets prompts focus more on the task itself, and the same schema can be reused across different Claude versions, reducing format regression testing caused by model upgrades.
Bedrock's structured output guides the model during decoding to generate only token sequences that conform to a given schema, thereby reducing the probability of format drift.
Bedrock's structured output is implemented through two paths: the JSON Schema output format and strict tool use.
40 more timeline events
All Facts (20)
Function Calling (Tool Use) is a standardized mechanism for large models to invoke external tools, where developers pre-declare tool names, descriptions, and parameter schemas, and the model autonomously determines when to make a call.
90%VerifiedEach tool in MCP has a strict JSON Schema description, including the name, functional description, and parameter specifications
90%VerifiedThe core mechanism of Function Calling is that developers describe external function signatures in JSON Schema format, and the model outputs structured JSON invocation instructions that conform to the schema specification.
80%VerifiedFunction Calling机制中,开发者将工具的名称、功能描述、参数Schema(通常为JSON Schema格式)注入到模型的请求中,模型输出结构化的JSON而非自然语言来调用工具
80%VerifiedAgents use the Tool Calling mechanism to allow models to output calling intent in a structured JSON format, with external programs executing the actual operations and feeding results back to the model.
80%VerifiedJSON Schema is a specification for describing and validating JSON data structures, capable of defining field requirements, data types, and value ranges.
80%VerifiedSetting additionalProperties: false in a JSON Schema rejects any extra fields not explicitly declared in the schema, eliminating the possibility of the model inventing additional fields.
80%VerifiedStructured output imposes constraints on token generation during the decoding phase through JSON Schema or function-calling mechanisms, which is fundamentally different from requesting JSON-format output in the prompt.
80%VerifiedParameter schemas are usually described in the form of JSON Schema, specifying the name, type, whether each parameter is required, the value range and format constraints.
75%VerifiedDefining typed JSON Schema for tools can reduce format errors and hallucinated parameter filling during model calls, improving call success rates.
75%VerifiedThe basic principle of tool calling is that the model identifies scenarios requiring external capabilities, outputs a structured function call request (usually in JSON format), and after the external system executes it, the result is returned to the model to continue reasoning.
75%VerifiedJSON Schema is a declarative specification based on JSON format, originating from a community draft in 2009, with standardization work advanced by the IETF in RFC 8927 and subsequent drafts.
75%VerifiedThe latest version of JSON Schema is Draft 2020-12, maintained by json-schema.org.
75%VerifiedJSON Schema is maintained by the IETF, and the current version is Draft 2020-12.
70%VerifiedSwagger已更名为OpenAPI Specification,是一套用于描述RESTful API的标准化规范,以JSON或YAML格式定义API信息,目前业界广泛使用OpenAPI 3.0/3.1版本
70%VerifiedIn MCP, JSON schema is used to describe tool input parameters; the host can use it to automatically generate call forms, validate parameters or reject invalid parameters in advance, but it does not constrain whether a tool should be called or whether a call is authorized.
65%VerifiedConstrained decoding can only guarantee that the syntactic structure of the output is legal (shape); it cannot guarantee the semantic correctness of the output content.
65%VerifiedFor AI, tools are essentially a menu described in JSON Schema; the clearer the description, the higher the accuracy with which the model selects tools.
65%VerifiedSchema enforcement is typically implemented through JSON Schema validation, type systems, or dedicated tool-call interception layers, inserting a deterministic validation step decoupled from model inference before function call parameters are executed.
65%VerifiedThe quality of the description directly affects the accuracy of tool invocation; vague or ambiguous descriptions may cause the model to trigger a tool incorrectly or fail to call it when it should.
65%