fix_json
Repair broken JSON files by stripping comments, fixing trailing commas, converting single quotes, and removing BOM/NUL characters. Supports dry-run mode for analysis without writing.
Instructions
Repair broken JSON: strip comments, fix trailing commas, convert single quotes, remove BOM/NUL. Supports dry_run mode.
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": {
"path": "<path>"
},
"name": "fix_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the JSON file | |
| dry_run | No | true = analyze only, false = write repaired file |