Skip to main content
Glama

go_to_definition

Jump directly to a symbol's definition by specifying its file, line, and column. Uses zero-based coordinates for precise navigation.

Instructions

Navigate to symbol definition.

USAGE: Position cursor on a symbol reference, returns definition location. OUTPUT: File path, line, column of the definition.

IMPORTANT: Uses ZERO-BASED coordinates. If editor shows 'Line 14, Column 5', pass line=13, column=4

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYesZero-based column number
lineYesZero-based line number
filePathYesPath to source file (absolute or relative to project)
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses zero-based coordinates, prerequisite, and output format. Could mention behavior when symbol not found, but overall transparent.

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?

Very concise, well-structured with USAGE, OUTPUT, IMPORTANT sections. Every sentence is meaningful and front-loaded.

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

Completeness4/5

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

No output schema, but description explains return format. Covers parameters and prerequisites. Could mention error handling, but sufficient for a simple navigation tool.

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?

Input schema has 100% coverage with descriptions. The description adds value by emphasizing zero-based coordinates and prerequisite, exceeding baseline.

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 'Navigate to symbol definition' with specific verb and resource. It distinguishes from siblings like 'find_references' and 'get_hover_info' by specifying cursor positioning and definition location.

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?

Explicit usage: 'Position cursor on a symbol reference' and important notes on zero-based coordinates. Also states prerequisite: 'Requires load_project to be called first.' Lacks explicit alternatives but context is clear.

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/pzalutski-pixel/javalens-mcp'

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