Pretty-print JSON
json_formatFormat JSON with indentation (2 or 4 spaces, or tabs) and optionally sorted keys. Returns the formatted text. Use to make machine JSON readable or to normalise it for diffs. Example: text={"b":2,"a":1}, indent=2, sortKeys=true. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The JSON text | |
| indent | No | 2 (default), 4 or tab | |
| sortKeys | No | true to sort object keys |