repair_malformed_json
Repair malformed JSON from LLMs by fixing truncated strings, unclosed quotes, missing braces, trailing commas, and single-quoted values.
Instructions
Repairs truncated JSON, unclosed quotes, missing closing braces, trailing commas, and single-quoted strings emitted by LLMs. (0.005 USDC on Base L2)
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": {
"payload": "<payload>"
},
"name": "repair_malformed_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Input parameters or JSON string payload for the tool execution | |
| paymentSignature | No | Base L2 USDC micropayment signature or transaction hash for x402 settlement |