Validate JSON data against a JSON Schema (draft 2020-12 / draft-07)
json_validateValidate JSON data against a JSON Schema (draft 2020-12 / draft-07). Checks data against a schema: types, enum/const, numeric and string limits, patterns, formats (email, date-time, uri, uuid, ipv4/6, hostname), arrays, objects, $ref (same document), allOf/anyOf/oneOf/not, if/then/else. Returns every error with its JSON Pointer path. Remote $ref is not fetched. Price: $0.003 USDC per call via x402 (eip155:8453).
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": {
"schema": "<schema>",
"data": "<data>"
},
"name": "json_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Data to validate (any JSON value; a string is parsed as JSON when it is valid JSON, otherwise validated as a plain string) | |
| schema | Yes | JSON Schema (a JSON value, or a string containing JSON) | |
| formats | No | Assert "format" keywords |