Skip to main content
Glama

definition

Jump to where a Python symbol is declared using its file path, line, and column. Resolves targets through type inference, so typed parameters and attributes work too.

Instructions

Go to the definition of the symbol at a position.

line and column are 1-indexed. column is a UTF-16 character offset on the line (not a visual/display column): a leading tab counts as one character.

Resolves through ty's type inference, so this works even when the call site only has a typed parameter/attribute (e.g. services.some_method() where services: AppServices is a constructor argument), not just direct references to a name in scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes
columnYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real behavioral context: it discloses that resolution goes through ty's type inference and works even when the call site only has a typed parameter (the `services.some_method()` example). It does not discuss failure modes or what happens on an unresolved position, keeping it from a 5.

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?

Three tightly scoped paragraphs, front-loaded with the core action and immediately followed by the non-obvious offset semantics. Every sentence earns its place with no filler.

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

Completeness5/5

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

An output schema exists, so return values need not be explained. The description covers the action, the tricky parameter conventions, and the type-inference capability that distinguishes this tool's reach — the essentials for calling it correctly on a read-only LSP operation.

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?

Schema coverage is 0%, so the description must compensate. It documents `line` and `column` precisely (1-indexed, UTF-16 offset, tab counts as one character), which is exactly the semantics that matter for a position-based call. `file_path` is left unexplained, though it is self-evident.

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?

States a specific verb+resource ("go to the definition of the symbol at a position"), which an agent can distinguish from read/list siblings like references or outline. It never explicitly names a sibling to route against, so it stops short of a 5.

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?

Usage is implied by "the symbol at a position" — the agent infers it is a code-navigation lookup. But there is no when-to-use vs when-not, and no contrast with adjacent tools such as hover, symbol_info, or references, which is a clear gap for a navigation family.

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