Skip to main content
Glama

Explain one path

snapshot_explain
Read-onlyIdempotent

Explains how one repository path will be handled in the next snapshot: its layer, kind, language and part, or exact exclusion reason, answering why a file is missing.

Instructions

Explain how the next snapshot would treat one path: its layer, kind, language and part, or the exact reason it is excluded. Answers "why is this file missing".

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": {
      "path": "<path>"
    },
    "name": "snapshot_explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
onlyNoGlobs to include: replaces the config allow-list for this run.
pathYesPath relative to the repository root. Directories are explained as a whole.
rootNoRepository root. Defaults to the directory this server was started in.
sarifNoAlso write reports/audit.sarif beside reports/audit.md, for CI code scanning.
ignoreNoGlobs to exclude, added to the config deny-list for this run.
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.
stagedNoOnly files staged in the git index.
skeletonNoReplace every function body with `{ /* ... */ }`, keeping signatures, imports and exports. Applies to TypeScript, JavaScript and JSX.
changedSinceNoOnly files changed since this git ref, for example "main" or "HEAD~3".
maxPartTokensNoToken ceiling per part, for example 32000 or "32k". Narrower than maxPartBytes; it converts at four bytes per token.
withDependentsNoWith staged or changedSince, also include the files that import the changed ones (one hop).

Output Schema

NameRequiredDescriptionDefault
pathNo
reasonNo
includedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and a closed-world, non-destructive profile, so the safety bar is low. The description does add real value by disclosing that the result is a prediction about the *next* snapshot (a dry-run against configuration) and that exclusion reasons are returned verbatim. However, it never says that the many override parameters (staged, changedSince, only/ignore, outDir) alter the snapshot being explained, which an agent needs to reason about results.

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?

Two tight sentences with the core behavior front-loaded and the motivating question last. Nothing is padded, though the second sentence is largely a restatement of the exclusion-reason clause.

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 and the description still names the key fields, so return values are well covered for a read-only, single-path tool. The one gap is that with 11 parameters the description doesn't clarify that the optional filters define which 'next snapshot' is being explained.

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% across all 11 parameters, so the schema already carries the semantics; baseline 3 applies. The description only reinforces that 'path' is a single repository-relative path and adds no hints about how the override parameters interact with the explained snapshot.

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?

Specific verb and resource: 'Explain how the next snapshot would treat one path', with the exact outputs enumerated (layer, kind, language, part, or exclusion reason). It is clearly a diagnostic/explanation tool rather than a content reader like snapshot_read, though it never names a sibling to sharpen 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 Guidelines4/5

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

Provides a concrete usage scenario — 'Answers "why is this file missing"' — which tells the agent exactly when to reach for it instead of reading or searching. It stops short of stating when not to use it or naming an alternative for the success-path case.

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