Skip to main content
Glama
office233
by office233

lsp_definition

Read-onlyIdempotent

Jump to the definition, type definition, or implementation of a symbol at a specified file and line to resolve code references.

Instructions

Go to definition (kind: definition | typeDefinition | implementation) of the symbol at file:line (give character or symbol name).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesSource file
kindNo
lineYes1-based line
symbolNoIdentifier on that line; its column is found automatically
characterNo1-based column (or give symbol instead)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this is a read-only, idempotent, non-destructive operation, so the safety profile is covered. The description adds the positional requirement (file:line plus a symbol/character marker) but says nothing about the response (a location, possibly multiple at kind=implementation) or failure modes.

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?

A single compact sentence, front-loaded with the action and immediately followed by the kind options. No wasted words, though the parenthetical phrasing is slightly dense.

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?

With 5 parameters, no output schema, and moderate complexity, the description covers the inputs adequately but omits what a caller gets back and how to disambiguate from the sibling vscode_go_to_definition. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so the schema largely documents the parameters including the kind enum and the 1-based semantics of line/character. The description adds only the mutual-exclusion hint '(give character or symbol name)', which is useful but marginal beyond the 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 definition') and resource (the symbol at file:line), and enumerates the three supported kinds. It is distinguishable from siblings like lsp_references and lsp_hover, though it does not explicitly differentiate from the near-duplicate vscode_go_to_definition.

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 'kind' enumeration and the note to supply character or symbol name, but there is no explicit when-to-use vs when-not, and no guidance on choosing between this and vscode_go_to_definition or lsp_references.

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

Deploy Server

Other Tools