query_json
Query JSON structures using JSONPath expressions. Retrieve matched values with their paths using dot-notation, wildcards, filters, and array slicing.
Instructions
Query a JSON structure using JSONPath syntax. Supports dot-notation ($.store.book[0].title), recursive descent ($..author), array slicing ($[0:5]), wildcards ($..*), and filter expressions ($..book[?(@.price < 10)]). Returns matched values with their paths.
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>",
"path": "<path>"
},
"name": "query_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON string to query. | |
| path | Yes | JSONPath expression, e.g. "$.users[*].name", "$..email", "$[0:10]", "$..[?(@.price > 100)]". |