Skip to main content
Glama

definition

Jump to where a symbol is declared at a given file, line, and column, including CSS custom properties and #id/.class selectors across indexed files.

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

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 burden and does well: it discloses the 1-indexed, UTF-16 offset convention, tab handling, and that CSS tokens are answered from a cross-file index scoped per WEBNAV_MCP_ROOTS root. It does not describe the return shape or a 'no definition found' behavior, 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-loaded with the core action, then supporting detail. The CSS parenthetical is long and dense but every clause adds real semantic value, so little is wasted.

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 3-param positional tool with no annotations and no output schema, the description covers position semantics and the CSS special case well, but omits what is returned (a definition location list) and what happens on failure. Adequate but with clear gaps.

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, and it does for the two non-obvious parameters: line/column are 1-indexed with column being a UTF-16 character offset where a tab is one character. Only file_path's meaning is left implicit, which is acceptable given its obviousness.

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?

States a specific verb and resource ('Go to the definition of the symbol at a position') that an agent can distinguish from siblings like references, hover, and symbol_info. It even clarifies the difference from references in the CSS special case, so the purpose is unambiguous.

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 gives rich context for the CSS/custom-property case, but it never explicitly says when to choose this over siblings like hover, symbol_info, or implementations. Usage is implied by the tool name rather than stated as guidance.

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