Skip to main content
Glama

Plan a reading order for a question

snapshot_plan_for
Read-onlyIdempotent

Selects the smallest set of snapshot files needed to answer a question within a token budget, ordered for reading with a reason for each pick.

Instructions

Given a question and a token budget, return the smallest set of files from the snapshot that answer it, in reading order, each with the reason it was chosen and the part it lives in. Deterministic: path and symbol matches first, then the imports of the strongest matches, packed to the budget. 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_plan_for"
  }
}

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, in the user words.
maxTokensNoBudget for the plan (default 30000).
includeTestsNoInclude test files (default false).

Output Schema

NameRequiredDescriptionDefault
filesNo
notesNo
skippedNo
questionNo
usedTokensNo
budgetTokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, closed-world, and non-destructive behavior, and the description's trailing 'Read-only' merely restates that. The real contribution is the determinism algorithm: path and symbol matches first, then imports of the strongest matches, packed to the budget, with a reason and location attached to each file. That tells the agent how output is ordered and why, which annotations cannot.

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 short sentences, front-loaded with the outcome (smallest answering set in reading order) before the algorithm. The closing 'Read-only.' duplicates readOnlyHint=true and is the one sentence that does not earn its place.

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?

An output schema exists, so return values need not be spelled out, and the description wisely spends its words on selection strategy and ordering instead. It is complete enough to call correctly, though it never mentions the includeTests toggle or how the budget interacts with the minimum of 500.

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%, so the schema already documents root, outDir, question, maxTokens, and includeTests in detail. The description reinforces the question and token-budget pairing but says nothing about includeTests or the root/outDir defaults, so it adds only modest meaning beyond structured fields.

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

Purpose4/5

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

The description names a specific verb and resource: it returns the smallest set of snapshot files answering a question, in reading order, with per-file reasons. That is far more precise than the title alone. It does not, however, contrast itself with nearby siblings such as snapshot_plan or snapshot_answer, so an agent must infer the boundary.

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

Usage Guidelines3/5

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

The opening phrase 'Given a question and a token budget' implies the usage scenario, and the budget-packing sentence hints at when this is appropriate. There is no explicit when-to-use or when-not-to-use guidance, and no named alternative for cases where the agent already knows what to read or wants a raw answer rather than a plan.

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