format_json
Parse and pretty-print JSON strings with custom indentation. Reliably handles files of any size without crashing.
Instructions
Parse and pretty-print a JSON string with configurable indentation. Handles JSON of any size — the only MCP JSON tool that does not crash on 100MB+ files. Returns the formatted result along with stats (node count, depth, size, parse time).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON string to format. Can be any size — large files are parsed in a worker-like pattern to avoid blocking. | |
| indent | No | Number of spaces for indentation (default: 2) |