Skip to main content
Glama

Assemble a bounded context block

snapshot_context
Read-onlyIdempotent

Returns redacted, preview-bounded file or symbol contents from a snapshot as one token-budgeted context block, and reports files that do not fit instead of dropping them.

Instructions

Given file paths, symbol names, or both, return their contents (from the snapshot, so redacted and preview-bounded) as one context block within a token budget. Each file contributes a head window; files that do not fit are reported, never silently dropped.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "snapshot_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoRepository root. Defaults to the directory this server was started in.
filesNoPaths, as the manifest names them.
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.
symbolsNoExported symbol names.
maxTokensNoBudget for the block (default 20000).
linesPerFileNoHead lines per file (default 80).

Output Schema

NameRequiredDescriptionDefault
filesNo
missingNo
usedTokensNo
budgetTokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description nevertheless adds real behavioral detail: contents are redacted and preview-bounded, each file contributes only a head window, and files that do not fit are reported rather than silently dropped. That truncation/degradation policy is exactly the kind of disclosure an agent needs and cannot infer from annotations.

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?

Two sentences, zero filler, with the input contract front-loaded and the budget/degradation rule immediately after. 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?

An output schema exists, so return shape need not be described, and all six parameters are documented in the schema. For a read-only, bounded-assembly tool the description covers input contract, bounding behavior, and failure reporting adequately.

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%, so the baseline is 3, but the description adds meaning the schema does not: 'head window' explains what linesPerFile actually controls, and the token-budget sentence explains how maxTokens governs inclusion. Root/outDir snapshot semantics are left to the schema.

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 output form: return the contents of file paths and/or symbols as one context block within a token budget. 'From the snapshot, so redacted and preview-bounded' makes it distinguishable from a raw file reader, though it never names a sibling to contrast against.

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?

Usage is only implied by the input shape ('Given file paths, symbol names, or both') and by the token-budget framing, which hints at assembling bounded context. There is no explicit statement of when to prefer this over snapshot_read, snapshot_query, or snapshot_diff_context, and no exclusions.

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