Skip to main content
Glama

Ask over collected records

ask_collected_records
Read-only

Answer from collected records, with quotes tied to exact lines.

Extracts and synthesises across material too large to fit in context, and returns every claim traceable to a line range in the original. Use instead of summarising from memory whenever the evidence has to hold up — quotes come back with their locations, so they can be checked against the source.

Not for: exact wording or counting occurrences — grep_collected_records does that without an LLM call; or material small enough to read directly — use read_collected_records.

In quotes and both modes the output is quotes: [{ id: '{<uuid>}', index }] — one block per record, with index formatted like the index field of advanced_web_search / advanced_web_fetch results. Empty array when no quotable evidence is found. When part of the material could not be read or worked into the result, notes says what is missing. If status: "running" is returned, poll get_task_results({ taskIds }).

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": {
      "dataIds": "<dataIds>",
      "query": "<query>",
      "mode": "<mode>"
    },
    "name": "ask_collected_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes`answer` for narrative prose, `quotes` for a per-record line-range index, `both` for both.
queryYesThe question to answer over the selected records.
dataIdsYesOne or more Data records to answer the question over. Each item is `{ id, version?, from?, to? }` — pass `{from, to}` to scope the citation to a specific line range; `version` is optional and defaults to latest. URLs are not accepted; collect them via `advanced_web_search` or `advanced_web_fetch` first.
maxWaitSecNoHow long to wait before returning `status: "running"` with a `taskId` to poll via `get_task_results`. Defaults to 50 seconds, which is also the server's ceiling — a larger value is clamped down to it, not honoured.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply readOnlyHint, and the description adds substantial behavior beyond it: the exact shape of `quotes` output per mode, the empty-array case, `notes` reporting partial/unreadable material, and the async contract (status running → poll `get_task_results({ taskIds })`). This is the rare case where a description carries real operational detail.

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 exclusions, then output contract — a logical order with no filler sentences. It is dense (the output-shape sentence is syntactically heavy) but every clause carries information.

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

Completeness5/5

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

With no output schema, the description must describe returns, and it does: the `quotes` array shape, the empty case, `notes` for missing material, and the async polling path. Nothing an agent needs in order to call and interpret it is missing.

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 coverage is 100% and the parameters are richly documented in-schema, including the mode enum, line-range scoping, and the `maxWaitSec` clamp. The description adds little parameter-level meaning beyond reiterating the mode semantics, so the baseline 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?

The opening line pairs a specific verb ('Answer') with a specific resource ('collected records') and adds the distinguishing trait — quotes tied to exact line ranges. It is immediately separable from grep (exact matching) and read (raw reading) siblings.

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

Usage Guidelines5/5

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

Explicit routing: use this 'instead of summarising from memory whenever the evidence has to hold up', with a 'Not for' section naming `grep_collected_records` for exact wording/counting and `read_collected_records` for small material. Both the when and the when-not are stated with the alternative tool named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources