json_validate
Validate JSON text, identify its root type, and return compact normalized JSON (object keys sorted) plus a SHA-256 hash of it. Use it to check model or API output before parsing, or to compare two documents by hash; to read one field use json_extract. Runs without network access and does not store your input. Input up to 100,000 bytes (larger input is an error); trailing data after the first value counts as invalid. Returns valid, root_type, normalized_json, bytes and sha256; invalid JSON returns valid false with the parser error instead of failing. normalized_json escapes <, > and & as \u003c, \u003e and \u0026, and sha256 is the hash of that string.
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_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | JSON text to validate, up to 100 KB. | |
| l402_proof | No | L402 payment proof "<macaroon>:<preimage>". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set. |