Skip to main content
Glama

Search the snapshot text

snapshot_search
Read-onlyIdempotent

Search included snapshot parts case-insensitively for text or regex and return each match's path, part, line, and snippet within match and scan limits; redacted and excluded data stays hidden.

Instructions

Case-insensitive text search across the emitted parts, bounded by a match cap and a scan budget. Returns the path, part and line number of each match with a short snippet. Reads only what the snapshot contains, so redacted values and excluded files are never found.

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": {
      "query": "<query>"
    },
    "name": "snapshot_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoRepository root. Defaults to the directory this server was started in.
queryYesText to find (at least 3 characters).
regexNoTreat the query as a regular expression.
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.
maxMatchesNoCap on matches (default 50).
contextLinesNoLines of context around each match (default 0).

Output Schema

NameRequiredDescriptionDefault
matchesNo
scannedNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, and the description adds useful context: matches are bounded by a match cap and a scan budget, and excluded or redacted data cannot be returned. It does not explain what happens when the scan budget is exhausted, but it meaningfully improves transparency beyond the 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?

Three sentences are front-loaded with the operation, then return shape, then a scope limitation. Every sentence adds useful information with no redundant restatement.

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?

Given a six-parameter schema with full descriptions, an output schema, and safety annotations, the description supplies the remaining scope and truncation context needed for correct invocation. Nothing essential to selecting or calling the tool is missing.

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 coverage is 100%, so root, query, regex, outDir, maxMatches, and contextLines are already documented in the schema. The description mentions the match cap and a scan budget but adds no parameter-level syntax, defaults, or edge-case details beyond the schema, making the baseline 3 appropriate.

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?

States a specific verb and resource ('Case-insensitive text search across the emitted parts'), so the agent knows exactly what operation is performed and what data is searched. It does not name or distinguish a sibling alternative such as snapshot_query or snapshot_locate, so it falls short of a 5.

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 description implies usage through the search context and a key limitation: only snapshot contents are read, so redacted values and excluded files are never found. It gives no explicit when-not guidance and does not name alternatives, so the usage guidance remains implied rather than directive.

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