format_json
Format, validate, and analyze JSON strings, returning pretty-printed output, minified version, and statistics like key count and depth.
Instructions
Format, validate, and analyze JSON. Returns formatted output, minified version, and stats (key count, depth, size, type counts).
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": "format_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | JSON string to format | |
| indent | No | Indent spaces (default: 2, range: 0-8) | |
| minify | No | Return minified JSON (default: false) | |
| sort_keys | No | Sort object keys alphabetically (default: false) |