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. If status: "running" is returned, poll get_task_results({ taskIds }).

Input Schema

TableJSON 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.8/5.0
Behavior5/5

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

The description adds substantial behavior beyond the readOnlyHint annotation: it explains the asynchronous status: 'running' path with polling via get_task_results, the empty-array result when no quotable evidence exists, and the exact quote block format. This is far more than the annotation alone communicates.

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?

The description is well front-loaded and organized into purpose, usage, and output-format sections, but it repeats the same idea several times: line-tied quotes are mentioned in the opening line, the second sentence, and again in the third sentence. Each point is useful, but the redundancy is noticeable.

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?

Despite having no output schema, the description fully explains return shapes, empty results, line-range indexing format, and async polling. Given the tool's complexity — 4 parameters, 3 modes, async behavior, and no output schema — nothing necessary for a correct call or interpretation is missing.

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

Parameters4/5

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

The input schema is fully documented, so the baseline is 3; the description goes beyond it by tying mode values to concrete output shapes ('In quotes and both modes the output is quotes: [{ id... }]') and clarifying the polling contract for maxWaitSec. It does not deeply re-explain each parameter, but the schema already handles that.

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 description opens with a specific verb and resource: 'Answer from collected records, with quotes tied to exact lines.' It clearly distinguishes the tool from siblings by contrasting it with grep_collected_records and read_collected_records, and by emphasizing synthesis over exact matching or direct reading.

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?

It explicitly states when to use the tool ('material too large to fit in context', 'evidence has to hold up') and when not to ('exact wording or counting occurrences', 'material small enough to read directly'), naming the alternative tools for those cases. This gives an agent decisive routing criteria.

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