util_json_repair
Repair broken JSON (offline, deterministic) — Fixes malformed JSON from LLMs and scrapers without AI: strips markdown code fences and surrounding prose, removes comments and trailing/extra commas, quotes unquoted keys and bare values, converts single quotes and smart quotes, Python/JS literals (True/False/None/undefined/NaN), hex and odd numbers, escapes raw newlines, inserts missing commas and closes unclosed strings and brackets. Returns the parsed json, compact or pretty (pretty=1) text and the list of fixes applied. 422 if nothing JSON-like is present. Cheaper, faster alternative to /v1/ai/json-repair. Price: $0.001 USDC (Base, via 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": {
"json": "<json>"
},
"name": "util_json_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | {name: 'Ada', age: 36, tags: ['math','code',], active: True,} |