Skip to main content
Glama

Question in, budgeted context out

snapshot_answer
Read-onlyIdempotent

Plans a question, selects relevant repository files, and returns line-numbered head windows within a token budget, noting why each file is included or skipped.

Instructions

The one-call version of plan-then-read: plan a question, then return each chosen file as a head window with line numbers within the token budget. Every included file says why it is there; every planned file that did not fit says so. Read-only.

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": {
      "question": "<question>"
    },
    "name": "snapshot_answer"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoRepository root. Defaults to the directory this server was started in.
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.
questionYesWhat you need to answer.
maxTokensNoBudget for the whole block (default 20000).
includeTestsNoInclude test files (default false).
linesPerFileNoHead lines per file (default 60).

Output Schema

NameRequiredDescriptionDefault
filesNo
omittedNo
questionNo
usedTokensNo
budgetTokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so "Read-only" largely restates them. The description does add real behavioral context beyond the annotations: output is head windows with line numbers, each included file carries a rationale, and planned files that did not fit are reported rather than silently dropped. It does not discuss how truncation interacts with linesPerFile or what happens on budget exhaustion, but the output schema carries return structure.

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?

Three tight sentences, front-loaded with the identifying comparison before the output contract. Only "Read-only" is arguably wasted since annotations already assert it, but it functions as a quick safety tag.

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?

With an output schema present and full schema coverage on six parameters, the description only needs to convey what the call does and how it behaves. It covers the planning step, the budget constraint, and the per-file rationale/omission reporting, leaving defaults and format details to the schema.

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 baseline is 3, and the description only loosely reinforces two parameters by referring to a token budget and to head windows per file. It adds no meaning for root, outDir, includeTests, or the interaction between maxTokens and linesPerFile.

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 chain (plan a question, then return head windows per chosen file) and positions itself explicitly as "the one-call version of plan-then-read," which separates it from the snapshot_plan + snapshot_read pairing among siblings. The agent knows exactly what resource comes out: line-numbered head windows of selected files.

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?

The phrase "the one-call version of plan-then-read" tells the agent to reach for this instead of composing a plan and read sequence manually, and "within the token budget" signals the budgeted-context use case. It stops short of stating when NOT to use it (e.g., when full-file reads or diff-scoped context are needed) or naming the sibling alternatives directly.

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