Skip to main content
Glama

get_definition

Locate the definition of any symbol and jump to its implementation. Supply a symbol name or file position to get the exact file path and line number.

Instructions

Returns the SOURCE LOCATION (file path + line number) of where a symbol is defined. 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 navigate to the implementation of a symbol. For documentation or type signatures at the same position, use explain_symbol 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.
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It goes beyond a simple definition lookup by disclosing fallback behavior ('snapped to the enclosing symbol') and the rationale for preferring symbol_name (avoids off-by-one and 'no identifier found' errors). It doesn't mention side effects or error cases, but for a read-only navigation tool, the disclosed behavior is sufficient.

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?

The description is three sentences, each earning its place: purpose, preference/behavior, and when-to-use/alternative. It is front-loaded with the most important information and contains no fluff or repetition.

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?

For a simple definition-lookup tool, the description covers purpose, input preferences, fallback behavior, and alternative tool. The absence of an output schema is mitigated by explicitly stating what is returned (file path + line number). All parameters are described in the schema, and the description adds the necessary contextual glue. Nothing critical is missing.

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% and each parameter is described, so the baseline is 3. The description adds meaningful semantic guidance by explaining why symbol_name is preferred over line/character and explicitly stating that line and character are not needed when symbol_name is provided. This goes beyond the schema's individual parameter descriptions.

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 opens with a specific verb+resource: 'Returns the SOURCE LOCATION (file path + line number) of where a symbol is defined,' making the core purpose unmistakable. It also differentiates from the sibling explain_symbol by clarifying that this tool is for implementation navigation, not documentation or type signatures.

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?

It explicitly states when to use the tool ('Use when you need to navigate to the implementation of a symbol') and names the alternative ('For documentation or type signatures at the same position, use explain_symbol instead'). It also provides a clear preference hierarchy: prefer symbol_name over raw line/character positions, with reasoning about avoiding off-by-one errors.

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

Install Server

Other Tools

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