Skip to main content
Glama
Tandoor Recipes MCP

Tandoor Recipes MCP

Query stashed result with jq

jq_query
Read-onlyIdempotent

Apply 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

NameRequiredDescriptionDefault
filterYesjq filter to apply to the stashed value. Examples: ".results | length", ".results[0]", ".results | map({id, name})", "keys", ".count".
handleYesStash handle from a prior tool result, e.g. "stash_<uuid>".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish this as a read-only, idempotent, non-destructive, closed-world operation, so the bar is lower. The description adds useful behavior context beyond that: the stash is a fixed JSON document produced by an earlier call, the handle comes from that call, and the tool returns a narrowed subset rather than the whole payload. It omits failure modes (expired/unknown handle, invalid or non-matching filter) and any note about result size or truncation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then the trigger condition, then a compact list of common filters. The filter examples partially repeat what the schema already shows, which is mild redundancy, but overall the text is tight and every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool with full schema coverage and no output schema, the description covers the essential mechanics: what is queried, where the handle comes from, and what the result is. It is slightly thin on error behavior and does not explain how `shape` or `sample_filters` from the stash notice should be used, which would help an agent craft a valid filter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both `handle` (pattern, example) and `filter` (length bounds, example filters). The description's filter examples largely duplicate the schema's examples and add no new syntax guidance, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (run a jq filter) and resource (a previously stashed tool result) plus the outcome (return the focused subset). This is clearly distinct from the sibling jq_stash_stats and from the data-manipulation siblings in the list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger condition: use it when a prior tool returned `{stashed:true, handle, shape, sample_filters}` instead of the full payload, and adds the philosophy of extracting only what is needed. It does not name an alternative (e.g. when to prefer jq_stash_stats or re-running the original tool instead), so it falls short of a full when/when-not treatment.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.