Content is loading…
Validate JSON against a JSON Schema and get precise error paths.
json_schema_validate#json#json schema#validation#ajv#structured outputValidates a JSON document against a specific JSON Schema. Provide the document in the json field and the schema in the schema field; returns a boolean status and a list of validation errors including precise paths, keywords, and messages for troubleshooting.
| Name | Type | Required | Description |
|---|---|---|---|
json | string | required | The JSON document to validate, as a string |
schema | string | required | The JSON Schema to validate against, as a string (draft-07 / 2019-09 / 2020-12 syntax) |
{
"json": "{\"name\":\"Nima\",\"age\":30}",
"schema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}},\"required\":[\"name\"]}"
}{
"json": "{\"age\":\"thirty\"}",
"schema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}},\"required\":[\"name\"]}"
}curl -X POST https://toolsy.my/api/mcp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "json_schema_validate",
"arguments": {
"json": "{\"name\":\"Nima\",\"age\":30}",
"schema": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}},\"required\":[\"name\"]}"
}
}
}'Generate a free API key or set up an OAuth connector for Claude.ai.