JSON Schema Validator
json_schema_validateValidate JSON data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12; "auto" reads $schema and defaults to 2020-12). Lists every error with a JSON Pointer path.
Returns: Object with valid (boolean), draft (the draft used) and errors: [{ path (JSON Pointer, "" for the root), keyword, message }].
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 document to validate. | |
| draft | No | Schema draft. | auto |
| schema | Yes | The JSON Schema, as JSON text. |