Skip to main content
Glama

definition

Locate the declaration of a symbol at a specific file position (line and column). Supports JS/TS, HTML, and CSS, including cross-file CSS selectors and custom properties.

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. On a --custom-property/#id/.class token in a .css/ .html file (or a name inside an HTML id="..."/class="..." value), answers from the cross-file index (see css_var/selector) instead of the single-file language server: for definition, just the definition(s) in the file's own root (each WEBNAV_MCP_ROOTS root is separate); for references, that root's definitions and usages.

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.3

TDQS

A3.8/5.0
Behavior4/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, and it does so well: it discloses 1-indexed lines, UTF-16 column offsetting, tab-counting behavior, and the significant CSS/HTML cross-file-index routing instead of single-file LSP. It omits what happens when no definition is found (error vs. empty), keeping it short of 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose in one sentence, then adds warranted detail about indexing and the CSS/HTML special case. Slightly dense but no wasted sentences.

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?

An output schema exists so return values need no explanation. The tricky parameter semantics and the CSS/HTML cross-file-index behavior are covered; the only real gap is the no-definition-found outcome.

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 thoroughly explains `line`/`column` indexing (1-indexed, UTF-16 offset, tabs count as one character), which is the non-obvious semantics; `file_path` is self-evident. This meaningfully exceeds the bare schema.

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 ('Go to the definition') and resource ('the symbol at a position'), and even contrasts with `references` in the CSS/HTML case. Clear enough to separate from siblings, though general sibling differentiation (hover, symbol_info) is only implicit.

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 standard LSP 'go to definition' semantic, and the CSS/HTML special case is explained. However, there is no explicit when-to-use/when-not guidance against alternatives like `hover`, `symbol_info`, or `references` for the common case.

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