HALOWERK: Check a model answer against a JSON schema and get every deviation named in plai
output_validateValidate model answers against a JSON Schema: every violation is reported by JSON path, with the rule broken and a plain-language fix.
Instructions
Check a model answer against a JSON schema and get every deviation named in plain language with its path, plus whether the JSON was wrapped in prose or a code fence.
Kostenpflichtig: 0.002 USDC je Aufruf. Bezahlt per x402 auf Base, ohne Konto. Hoechstens 0.002 USDC je Aufruf.
Validates output against a JSON Schema and reports each violation with its JSON path, the rule it broke and a sentence saying what to change. Accepts either a parsed object or the raw string a model returned: a payload wrapped in a code fence or surrounded by prose is unwrapped, and the wrapping is reported separately from schema errors so you fix the right layer. Draft 2020-12 and draft-07 are both supported, along with the common string formats. Optionally the repairable problems are listed: missing fields that have a default, and unexpected extra fields. It validates structure, never truth — a document that satisfies the schema perfectly can still be factually wrong, and nothing here checks that. Preis 0.002 USDC je Aufruf, Abrechnung über x402.
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>"
},
"name": "output_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | The model answer, as a parsed JSON value. Either this or output_text. | |
| schema | Yes | JSON Schema to validate against. | |
| all_errors | No | Report every violation instead of stopping at the first. | |
| output_text | No | The raw answer as text. Code fences and surrounding prose are stripped. | |
| suggest_repairs | No | List repairable problems (defaultable missing fields, extra fields). |