Skip to main content
Glama

inspect_symbol

Read-only

Retrieve a symbol's definition, source excerpt, references, imports, and candidate tests in one call by name; disambiguate results with file path and line.

Instructions

Get a symbol in one call: definition, source excerpt, references, imports and candidate tests.

A name is enough. For an ambiguous name, the result lists choices: give the repository-relative file_path and the definition start line to select one. Add task_hint to order the excerpts and tests for your task. For a long definition, follow next_source or set source_start_line. Keep each context_ranges group with its excerpt. Missing relationships do not prove absence.

Input Schema

NameRequiredDescriptionDefault
lineNo
file_pathNo
task_hintNo
workspaceNoProject path (default: this project)
max_tokensNo
symbol_nameYes
source_start_lineNo

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 this a read-only, non-destructive operation, so the safety profile is covered for free. The description adds genuine behavioral context beyond that: the ambiguity resolution flow, the ordering effect of task_hint, the next_source continuation for long definitions, and the caveat that missing relationships do not prove absence. It still says nothing about result size limits despite a max_tokens parameter with a 32000 ceiling.

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?

Roughly six short sentences, front-loaded with the payload inventory before any procedural detail. Every clause conveys a distinct operational fact, and the closing warning about missing relationships earns its place.

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?

For an aggregation tool with no output schema, the description covers what the agent needs: what comes back, how to disambiguate, how to order, and how to page. The only notable omissions are the truncated-result behavior implied by max_tokens and any hint about which sibling to use for a narrower query.

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?

With schema description coverage at only 14%, the description has to carry the parameter burden, and it does for the critical ones: it explains that symbol_name alone works, that file_path and the definition line are the disambiguation pair, that task_hint orders excerpts and tests, and that source_start_line pages into long definitions. workspace and max_tokens are left to the schema, with only workspace documented there, so a small gap remains.

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 opens with a specific verb and resource plus an explicit inventory of what comes back: definition, source excerpt, references, imports, candidate tests. The phrase 'in one call' signals that it aggregates work that siblings like cross_references, symbols and suggest_tests do individually, but it never names those alternatives outright, so differentiation is only implicit.

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 gives a concrete usage path: a name alone is sufficient, and an ambiguous name requires file_path plus definition start line to disambiguate. It also explains how to tune results with task_hint and how to continue with next_source or source_start_line. It stops short of saying when to prefer this over the sibling tools that cover pieces of the same ground.

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