Skip to main content
Glama

go_to_definition

Navigate to the definition of a symbol in your code by specifying file, line, and column. Returns the exact file path and position of type declarations, function implementations, or variable assignments.

Instructions

Jump to the definition of a symbol at a specific location in a file via LSP. Returns the file path and position where the symbol is defined. Useful for navigating to type declarations, function implementations, or variable assignments across the codebase.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
lineYes
columnYes
position_patternNo
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. The description mentions 'via LSP' but does not explain side effects, error handling (e.g., if the symbol is not found), or required permissions. It also does not specify the return format beyond 'file path and position'. This is insufficient for a tool with no annotations.

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 concise with two sentences, no wasted words. It front-loads the primary action and method, then adds use cases. However, a more structured format (e.g., separating purpose, parameters, and behavior) could improve readability.

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

Completeness2/5

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

Given the tool has 5 parameters, no output schema, and no annotations, the description is incomplete. It does not explain optional parameters (position_pattern, language_id), return value details, error conditions, or prerequisites like requiring an active LSP server. The sibling tools provide context but do not compensate for this lack of detail.

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?

With 0% schema description coverage, the description should compensate by explaining each parameter's role. It mentions 'specific location' which maps to line/column but does not explain file_path, language_id, or position_pattern. The description adds minimal semantic value beyond the schema itself.

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 clearly states the tool jumps to the definition of a symbol via LSP and returns the file path and position. It mentions specific use cases like type declarations, function implementations, and variable assignments. However, it does not differentiate from sibling tools such as go_to_declaration or go_to_implementation, which reduces clarity on when to use this specific 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 provides implied guidance on when to use the tool (for navigating to definitions), but it lacks explicit instructions on when not to use it or which alternative tools to consider. Given the numerous sibling LSP navigation tools, more specific guidance would be beneficial.

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