JSON repair for LLM output (fences, quotes, commas, truncation) ($0.002/call)
json_repair$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Turns malformed or LLM-style JSON into valid JSON: removes code fences and leading text, fixes trailing commas, single or smart quotes, unquoted keys, comments, Python constants and truncated endings, and lists the problem types found. Input: json (POST for large input). Limit: 1 MB. Offline.
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": "json_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | JSON text, up to 1 MB (a JSON value is also accepted in a POST body or MCP arguments) | |
| trial | No | Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | ||
| cache | No | ||
| fixes | No | ||
| _trial | No | Present when the call was a free trial call. | |
| changed | No | ||
| provider | No | ||
| repaired | No | ||
| price_usd | No | ||
| input_was_valid | No |