JSON format / minify / sort
json_toolsValidate JSON structure and reformat it with options to pretty-print, minify, or sort keys alphabetically. Returns clear error messages for invalid input.
Instructions
Validate and reshape a JSON string. mode=format pretty-prints, minify compacts, sort_keys recursively alphabetizes object keys. Returns a clear error for invalid JSON.
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": {
"input": "<input>"
},
"name": "json_tools"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | format | |
| input | Yes | The JSON text to process | |
| indent | No | Indent width for format/sort_keys |