JSON repair: fix broken JSON
json_repairFix JSON as LLMs often write it: removes json fences and surrounding prose, comments and trailing commas, converts single quotes, quotes bare keys, maps True/False/None, and closes unclosed brackets. Returns the repaired JSON and whether it now parses. Use when an LLM's JSON output fails to parse. Example: text=json
{name: 'Ada', tags: ['x',],}
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": {
"text": "<text>"
},
"name": "json_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The broken JSON text |