Skip to main content
Glama

Find a symbol definition

snapshot_symbol
Read-onlyIdempotent

Locate where a function, class, interface, type or constant is defined in a codebase snapshot and return a numbered window around it, optionally listing call sites across files.

Instructions

Find where a function, class, interface, type or constant is defined in the snapshot and return a window around the definition with line numbers. Searches the emitted parts, so redaction still applies. Read-only.

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

Input Schema

NameRequiredDescriptionDefault
nameYesSymbol name, case-insensitive.
rootNoRepository root. Defaults to the directory this server was started in.
linesNoWindow size around the definition (default 40).
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.
maxFilesNoCap on files searched (default 5).
referencesNoAlso report call sites: other files whose body mentions the name (default true).
maxReferencesNoCap on reported call sites (default 20).

Output Schema

NameRequiredDescriptionDefault
foundNo
matchesNo
referencesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so restating 'Read-only' adds nothing. The description does contribute real behavioral context beyond the annotations, though: search is limited to emitted parts and 'redaction still applies', and results are windows with line numbers. It omits what happens when the symbol is not found or is defined in multiple places.

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 compact sentences, front-loaded with the core action and its return shape. The trailing 'Read-only' is redundant with the annotations and could be dropped, but there is no other waste.

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?

With an output schema present, return-value details need not be explained, and the annotations carry the safety profile. The description covers what is searched (emitted parts), the redaction constraint, and the windowed result, which is sufficient for a read-only lookup tool with fully documented parameters. What remains, such as multiple-match behavior, is a minor omission rather than a gap an agent needs to call it correctly.

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%, so every parameter (name, root, lines, outDir, maxFiles, references, maxReferences) is already documented in the schema. The description adds only a loose connection to the window/line-number behavior of the 'lines' parameter and does not clarify root resolution or reference caps. Baseline 3 is 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?

The description uses a specific verb and resource: it finds where a function, class, interface, type or constant is defined in the snapshot and returns a line-numbered window around the definition. That tells an agent exactly what comes back. It does not differentiate itself from near siblings such as snapshot_locate or snapshot_search, 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?

Usage is only implied: the mention of 'searches the emitted parts' hints at when this tool is appropriate, but the description never says when to use it instead of alternatives or what prerequisites must be met. No exclusions or routing guidance is given.

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