Query stashed result with jq
jq_queryApply jq filters to a previously stashed tool result to extract only the JSON subset needed, such as counts, selected records, or mapped fields, when the full payload was stashed.
Instructions
Run a jq filter against a previously stashed tool result and return the focused subset. Use this when a prior tool returned {stashed:true, handle, shape, sample_filters} instead of the full payload. Treat the stash like a JSON document the user already paid for: extract only what you need. Common filters: ".results | length", ".results[] | select(.id == 42)", ".results | map({id, name})", "keys", ".count".
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": {
"handle": "<handle>",
"filter": "<filter>"
},
"name": "jq_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | Yes | jq filter to apply to the stashed value. Examples: ".results | length", ".results[0]", ".results | map({id, name})", "keys", ".count". | |
| handle | Yes | Stash handle from a prior tool result, e.g. "stash_<uuid>". |