json-formatter
Format JSON: pretty-print with indentation or minify to a single line. Validates the input — invalid JSON returns a clear error pointing at the problem.
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-formatter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | Input JSON text. Must parse as valid JSON. | |
| mode | No | pretty: indent with spaces (default). minify: strip all whitespace. | |
| indent | No | Spaces of indent for pretty mode. Default 2. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Mode used. | |
| output | Yes | Formatted JSON string. | |
| bytes_in | Yes | Length of the input string. | |
| bytes_out | Yes | Length of the output string. |