Format JSON
format_jsonValidates and pretty-prints JSON text with the requested indentation. Returns a clear error message 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": {
"jsonText": "<jsonText>"
},
"name": "format_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indent | No | Spaces per indent level (0-8). 0 gives compact JSON. | |
| jsonText | Yes | The JSON text to format. |