format_json
Transform unformatted JSON strings into readable, indented output. Optionally sort object keys and control indentation level.
Instructions
Format JSON with pretty printing.
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_string": "<json_string>"
},
"name": "format_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json_string | Yes | JSON string to format | |
| indent | No | Number of spaces for indentation (default: 2) | |
| sort_keys | No | Whether to sort object keys (default: False) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |