Validate JSON against a schema
json_schema_validateChecks a JSON value against a JSON Schema (drafts 4, 7, 2019-09 and 2020-12) and lists every violation with its location. Use it to confirm structured output or an API payload is correct before sending it. data and schema may be JSON values or JSON strings.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data": "<data>",
"schema": "<schema>"
},
"name": "json_schema_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The JSON value to check (any type), or a JSON string of it | |
| draft | No | Default 2020-12 | |
| schema | Yes | The JSON Schema (object), or a JSON string of it |