llm_json_schema_check
Validate that an LLM JSON output matches a JSON Schema definition. Tests required fields, types, enums, nested objects, and arrays. Critical for function-calling and structured output testing.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output": "{\"name\":\"a\",\"age\":3}",
"schema": {
"type": "object",
"required": [
"name",
"age"
],
"properties": {
"age": {
"type": "integer",
"minimum": 0
},
"name": {
"type": "string"
},
"role": {
"enum": [
"admin",
"user"
]
}
}
}
},
"name": "llm_json_schema_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | The LLM JSON output (raw string, will be parsed) | |
| schema | Yes | JSON Schema (draft-07 subset) to validate against |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | No | ||
| errors | No | ||
| error_count | No | ||
| parse_error | No | ||
| parsed_type | No |