Skip to main content
Glama

generate_snapshot_batch

Returns a batch of source files with skeletons and deeper reads, plus a prompt to derive features and flows. Repeat with nextOffset until concept-map build is complete.

Instructions

Map step of the concept-map build. Returns one batch of source files (skeletons of every file in the batch plus a few deeper-read bodies for grounding), along with a system prompt instructing you to derive features and flows for ONLY this batch. Call repeatedly with the returned nextOffset until it is null, calling save_partial_snapshot between each call. Use product-natural feature names so partials merge cleanly in the reduce step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirYesAbsolute path to the project root directory
filesNoScope the batch walk to this explicit file list — e.g. the drift set from mason_check_drift (changedFiles + unmappedFiles). Pass the SAME list on every batch call of one refresh run. Triggers refresh mode: reduce_snapshot will merge the partials into the existing map instead of rebuilding it.
offsetNo0-indexed file offset to start the batch at. Omit on the first call; pass the `nextOffset` from the previous response for subsequent calls.
batchSizeNoFiles per batch. Defaults to 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.17.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the return payload composition, the agent-facing system prompt, the offset-based pagination loop, and the required interleaving with save_partial_snapshot. It omits failure modes and any permission or performance constraints, but otherwise gives strong operational context.

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

Conciseness5/5

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

Three sentences, each carrying distinct value: role/return, iteration protocol, and merge-friendly naming. The critical scoping and loop instructions are front-loaded, and there is no filler.

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 and no annotations, the description still communicates what is returned, how to paginate, what to call in between, and how partials integrate with the reduce step. An agent has everything needed to invoke and sequence this tool correctly.

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?

Schema coverage is 100%, setting the baseline at 3. The description adds real meaning beyond the schema: the `files` list must be identical across every batch call of a refresh run and triggers refresh mode, and `offset` must be omitted on the first call and then fed the returned `nextOffset`. These operational semantics are not apparent from the schema alone.

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 role (map step of the concept-map build) and precisely what it returns (a batch of source file skeletons plus deeper-read bodies and a system prompt for deriving features and flows). This clearly distinguishes it from siblings like full_analysis, reduce_snapshot, and save_partial_snapshot.

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?

Explicitly describes the iteration contract: call repeatedly with returned nextOffset until null, and invoke save_partial_snapshot between calls. It also names the downstream reduce step and the naming convention needed for partials to merge, leaving nothing to inference.

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