Infer or validate JSON Schema
validate_json_schemaInfer a JSON Schema from a sample, or validate JSON against a schema. Returns error paths plus TypeScript and Zod generated from the sample.
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": {
"json": "<json>"
},
"name": "validate_json_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | JSON document to infer from or validate. | |
| schema | No | JSON Schema. Omit it to infer a schema from the document. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zod | Yes | ||
| valid | Yes | ||
| errors | Yes | ||
| schema | Yes | ||
| typescript | Yes |