Skip to main content
Glama

Snapshot statistics

snapshot_stats
Read-onlyIdempotent

Count files by layer and kind, estimate tokens, and find the largest or most expensive snapshot parts from the manifest without rescanning the repository.

Instructions

Counts and costs: files by layer and kind, part sizes, token estimate, the largest files and the most expensive parts. Read from the manifest, so it is cheap and always agrees with what the snapshot claims.

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_stats"
  }
}

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.

Output Schema

NameRequiredDescriptionDefault
filesNo
kindsNo
partsNo
layersNo
tokensNo
heaviestNo
partSizesNo

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 declare it read-only, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: results are derived from the manifest (cheap, no recomputation) and are guaranteed to agree with what the snapshot claims, which tells the agent about cost and consistency.

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 short sentences with no filler, and the enumerated payload is front-loaded. The telegraphic fragment style ('Counts and costs: ...') is dense but readable.

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 explained, and annotations plus full schema coverage handle the safety and parameter story. What remains missing is sibling routing guidance, which is a usage gap rather than a completeness-of-operation gap.

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%, with both root and outDir fully documented including defaults and the constraint that outDir must resolve inside the served repository. The description adds no parameter meaning of its own, so the baseline of 3 applies.

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?

Names the concrete outputs it aggregates (files by layer and kind, part sizes, token estimate, largest files, most expensive parts), which lets an agent know exactly what it will get back. It does not differentiate itself from related siblings such as snapshot_budget or snapshot_health, which likely report overlapping cost/size information.

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 clause about reading from the manifest implies it is the cheap option and consistent with the snapshot's own claims, which hints at when to prefer it. However, there is no explicit when-to-use, when-not-to-use, or named alternative among the many sibling tools.

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