json repair
json_repairFix broken JSON from model output: strips code fences and chatter, single quotes, unquoted keys, trailing or missing commas, comments, Python True/None, and closes truncated strings and brackets; falls back to AI repair for the rest. Returns the parsed JSON and what was fixed. Costs $0.004 USDC per call (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": {
"text": "<text>"
},
"name": "json_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| use_ai | No | Default true (texts up to 6,000 characters) |