repair_json
Repair malformed JSON (trailing commas, single quotes, truncation, markdown fences, comments, python literals) and optionally validate/coerce it against a JSON Schema. Deterministic repair is free. If it fails and allow_llm_fallback is true, a paid LLM repair is attempted (requires x402 payment; charged only on success).
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": {
"input": "<input>"
},
"name": "repair_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The possibly-malformed JSON text | |
| schema | No | Optional JSON Schema the output must conform to | |
| allow_llm_fallback | No | Permit the paid LLM repair tier |