Skip to main content
Glama

Tests that cover a file, and files a test covers

snapshot_tests
Read-onlyIdempotent

Identifies which tests import a given source path; without a path, lists every test file and how many files it exercises. Read-only.

Instructions

The test side of the graph. Given a path, the tests that import it (plus the ones named after it); with no path, every test file and how many files it exercises. Read-only.

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

Input Schema

NameRequiredDescriptionDefault
pathNoSource or test path relative to the repository root.
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.
maxFilesNoCap on listed tests (default 50).

Output Schema

NameRequiredDescriptionDefault
testsNo
coveredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so 'Read-only.' is largely redundant. The genuinely added behavioral content is the mode dispatch: the tool's output shape changes depending on whether path is supplied. It does not cover what happens when a path matches no tests, or whether results are cached against a stale snapshot.

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 short sentences, front-loaded with the core identity, then the two modes in the order an agent would evaluate them. The trailing 'Read-only.' is the only mildly wasteful token, duplicating the annotation, and it is a single word.

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?

With an output schema present, return values need not be spelled out, yet the description still flags the two different result shapes, which is the key thing an agent needs to interpret the response. Remaining gaps (empty-result behavior, truncation signaling against maxFiles) are minor for a read-only query with full schema coverage.

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; the description earns a bump by explaining that path is not just a filter but a mode switch that inverts the response (tests-covering-file vs file-with-count). It adds no meaning for root, outDir or maxFiles, which remain schema-only.

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 concrete resource (test files) and states two precise behaviors: given a path, return the tests that import it plus same-named tests; with no path, return every test file and its exercised-file count. That is far more specific than the title alone. It stops short of naming a sibling it is not (e.g. snapshot_dependents or snapshot_neighbors), so differentiation is implied by 'the test side of the graph' rather than stated.

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?

It clearly splits the two usage modes with an explicit condition ('Given a path… with no path…'), which is exactly the branching an agent needs. There are no exclusions or pointers to alternative tools for the inverse direction (e.g. what to call to get a file's non-test dependents), so it falls short of the 5 bar.

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