Skip to main content
Glama

explain_symbol

Retrieve documentation and type details for a code symbol by name or file position. Resolves the exact identifier context to avoid offset mistakes, so you can understand code without navigating to source.

Instructions

Returns DOCUMENTATION and type information (LSP hover content: function signature, doc comment, often in Markdown) for the symbol at the given position or by name. PREFER a name (uri + symbol_name) — plumb resolves the exact identifier position for you, avoiding off-by-one errors; a raw file position (uri + line + character) is the fallback and, when it lands off an identifier, is snapped to the enclosing symbol. Use when you need to understand what a symbol is without navigating to its source. For the file location of where the symbol is defined, use get_definition instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriNoAbsolute path, file:// URI, or workspace-relative path of the document
lineNoZero-based line number. Required when symbol_name is not provided.
characterNoZero-based character offset. Required when symbol_name is not provided.
symbol_nameNoSymbol name to look up instead of a position — PREFERRED over line/character. Accepts plain name or ReceiverType.MethodName form. plumb resolves it against the file's symbols, avoiding the off-by-one and 'no identifier found' errors of a hand-computed position. When provided, line and character are not needed.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv0.17.0
    • changedInput schema / properties / character / description
      Previous value: -"Zero-based character offset"New value: +"Zero-based character offset. Required when symbol_name is not provided."
    • changedInput schema / properties / line / description
      Previous value: -"Zero-based line number"New value: +"Zero-based line number. Required when symbol_name is not provided."
    • addedInput schema / properties / symbol_name
      Added value: +{
      +  "description": "Symbol name to look up instead of a position — PREFERRED over line/character. Accepts plain name or ReceiverType.MethodName form. plumb resolves it against the file's symbols, avoiding the off-by-one and 'no identifier found' errors of a hand-computed position. When provided, line and character are not needed.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "line",
      -  "character"
      -]
  2. First observedv0.16.6

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden, and it discloses substantial traits: hover content format (Markdown), positional lookup fallback behavior, off-by-one error avoidance via symbol resolution, and snapping to the enclosing symbol when a position lands off an identifier. It does not state what happens when a symbol is not found, but it covers the major behavioral gotchas.

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?

Roughly four sentences, front-loaded with the primary purpose, followed by the preferred invocation path, the usage condition, and the sibling alternative. Every sentence earns its place, though it is slightly wordier than strictly necessary with some inline parentheticals.

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 a moderate-complexity tool with no output schema and no annotations, the description covers the return format, both invocation modes, fallback behavior, and the alternative tool. The main missing piece is failure behavior (e.g., return value or error when the symbol cannot be resolved), which prevents a 5.

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 description coverage is 100%, so the baseline is 3, but the description adds genuine value beyond the schema: it establishes that symbol_name is the preferred invocation form and explains why (plumb resolves the identifier, avoiding off-by-one errors), and it describes how line/character behaves when it misses an identifier (snapped to the enclosing symbol). This preference ordering does not exist in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Returns DOCUMENTATION and type information (LSP hover content: function signature, doc comment, often in Markdown)'. It clearly distinguishes this from get_definition by explicitly naming the sibling, so an agent can tell them apart immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit when-to-use statement ('Use when you need to understand what a symbol is without navigating to its source') and names the exact alternative ('For the file location of where the symbol is defined, use get_definition instead'). It also instructs which invocation form to prefer (name over position), leaving nothing to inference.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/plumbkit/plumb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server