Skip to main content
Glama

go_to_declaration

Navigate to the declaration of a symbol in code files using Language Server Protocol. Find where symbols are declared, especially useful for languages with separate header files like C/C++.

Instructions

Jump to the declaration of a symbol at a specific location in a file via LSP. Completes the 'go to X' family alongside go_to_definition, go_to_type_definition, and go_to_implementation. Most useful for languages with separate declaration and definition (e.g., C/C++ header files). Returns the file path and position where the symbol is declared.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
lineYes
columnYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: it's a navigation tool (implied by 'Jump'), uses LSP, and returns file path and position. However, it lacks details on error conditions, performance implications, or what happens if no declaration is found, leaving gaps in behavioral understanding.

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 appropriately sized and front-loaded: the first sentence states the core purpose, the second adds sibling context and usage guidance, and the third covers return values. Every sentence earns its place with no redundant information, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (navigation with LSP), no annotations, no output schema, and 0% schema coverage, the description is partially complete. It covers purpose, usage context, and return values, but lacks details on parameter semantics, error handling, and behavioral nuances, leaving room for improvement in overall completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'a symbol at a specific location in a file' and 'via LSP', which hints at the purpose of file_path, line, and column, but does not explain language_id or provide any syntax, format, or constraints for any parameters. This adds minimal value beyond the bare 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 clearly states the tool's purpose with specific verbs ('Jump to the declaration') and resource ('a symbol at a specific location in a file via LSP'). It explicitly distinguishes this tool from its siblings (go_to_definition, go_to_type_definition, go_to_implementation) by mentioning it completes the 'go to X' family, making the differentiation unambiguous.

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?

The description provides clear context on when to use this tool ('Most useful for languages with separate declaration and definition, e.g., C/C++ header files'), which helps guide selection. However, it does not explicitly state when NOT to use it or name specific alternatives beyond the sibling tools mentioned, missing some exclusion criteria.

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/blackwell-systems/agent-lsp'

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