Skip to main content
Glama

go_to_declaration

Navigate to the declaration of a symbol at a specified file location. Essential for languages where declarations differ from definitions, such as 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?

With no annotations, the description carries full burden. It discloses use of LSP and the return value (file path and position). It does not mention potential errors, prerequisites (e.g., file open), or limitations. Acceptable but not thorough.

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?

The description is two sentences, front-loaded with action and method, then context and return. Every sentence adds value. Could be slightly more streamlined, but overall 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 no output schema, the description mentions return type. Sibling tools are named but not detailed. Parameter explanation is missing. The description is adequate for a simple navigation tool but lacks completeness for new users unfamiliar with LSP.

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 has four parameters with zero description coverage. The tool description adds no explanation of what file_path, language_id, line, or column mean. The agent must infer parameter semantics solely from names, which is insufficient.

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: jump to the declaration of a symbol via LSP. It differentiates itself from sibling tools (go_to_definition, go_to_type_definition, go_to_implementation) and provides a concrete use case (C/C++ header files).

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 places the tool in the 'go to X' family and names siblings, giving context for when to use it. It notes it's most useful for languages with separate declaration/definition. However, it doesn't explicitly state when not to use it or provide alternative selection criteria beyond naming.

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