Format JSON
json_formatParse and pretty-print JSON text with a stable key order. Returns a readable error instead of throwing when input is invalid JSON, so formatting failures stay diagnosable.
Instructions
Parse JSON and return it pretty-printed with a stable key order. Returns a readable error instead of throwing when the input is not valid 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": {
"json": "<json>"
},
"name": "json_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON text to format | |
| indent | No | Spaces of indentation |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | ||
| formatted | Yes |