json
Query, merge, and validate JSON. Pure compute, no I/O — auto-registered by the installer.
Usage
bash
native-mcp jsonNo flags.
Tools
query
Extract a value from JSON using a simple path expression.
| Field | Type | Required | Description |
|---|---|---|---|
input | string | yes | JSON document. |
path | string | yes | Path expression. |
Path syntax
$— root.field— object field[N]— array index (0-based)["weird key"]or['weird key']— object key with non-identifier characters
Example: $.users[0].name, $["my-key"][3].
The result is pretty-printed JSON.
merge
| Field | Type | Required | Description |
|---|---|---|---|
a | string | yes | First JSON document. |
b | string | yes | Second JSON document; its keys win on conflict. |
deep | bool | no | If true, recursively merge nested objects (RFC 7396-ish). |
Non-object inputs cause b to win wholesale.
validate
| Field | Type | Required | Description |
|---|---|---|---|
input | string | yes | JSON document. |
Returns valid JSON plus the top-level type and a one-level-deep shape summary on success, an error otherwise.
Register in Claude Code
bash
claude mcp add native-json native-mcp json