Skip to main content
Glama

goto_declaration

Navigate directly from a symbol's usage to its declaration in C/C++ by providing file, line, and column. Resolves header declarations for quick code inspection.

Instructions

Go to the declaration of a symbol (relevant in C/C++ for header declarations).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colYesColumn number (1-indexed)
fileYesRelative file path from project root
lineYesLine number (1-indexed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior2/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 that the tool navigates to declarations and notes C/C++ header relevance, but it does not explain behavior such as what happens when no declaration is found, whether it opens a file, or how it handles multiple declarations.

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 a single concise sentence that front-loads the core action and adds a relevant context note. It is appropriately sized, though it could be slightly more informative.

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?

For a simple navigation tool with fully documented parameters, the description is mostly adequate. However, without annotations or an output schema, it would benefit from stating what the tool returns or does when the declaration is not found, and how it differs from goto_definition.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds no additional meaning beyond the schema, which is acceptable given the high coverage.

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 states a specific verb ('Go to') and resource ('declaration of a symbol'), and adds a C/C++ context note about header declarations. It is clear enough, though it does not explicitly distinguish itself from the sibling goto_definition, which is a closely related tool.

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

Usage Guidelines3/5

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

The description implies usage for navigating to a symbol's declaration, and the C/C++ note hints at when it is relevant. However, it does not explicitly state when to prefer this over goto_definition or goto_type_definition, nor does it mention any exclusions.

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