repair_json
Repairs malformed JSON emitted by LLMs by stripping markdown code blocks, single quotes, trailing commas, and Python literals to yield valid RFC 8259 JSON.
Instructions
Universal LLM JSON repair and syntax sanitizer. Fixes malformed JSON emitted by LLMs (stripping markdown code blocks, single quotes, trailing commas, and Python literals like True/False/None) into valid RFC 8259 JSON in sub-millisecond edge time.
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": {
"raw_json": "<raw_json>"
},
"name": "repair_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw_json | Yes | Malformed or broken JSON string to repair. |