Skip to main content
Glama
office233
by office233

lsp_references

Read-onlyIdempotent

Find all references to a symbol at a given file and line using the language server for exact, resolved results instead of text search.

Instructions

All references to the symbol at file:line, resolved by the language server (exact, not text search).

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered structurally. The description adds genuine context that results are LSP-resolved (semantic) rather than textual, but it omits return shape, result volume, and the effect of includeDeclaration.

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?

A single tight sentence with the core scope front-loaded and the disambiguating qualifier immediately after. No filler, nothing to cut.

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?

There is no output schema, yet the description says nothing about what is returned (list of locations, ordering, effect of limit). Combined with silent includeDeclaration semantics, the definition is adequate for identification but leaves behavioral gaps for a 6-parameter tool.

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 67%, above the 50% baseline, so the schema already documents file, line, symbol, and character. The description adds nothing about the two undocumented/under-documented parameters (limit's default, includeDeclaration's true-default meaning), so it fails to compensate for the remaining gap.

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 ('all references to the symbol') anchored at file:line, and adds a sharp qualifier ('resolved by the language server (exact, not text search)'). This is clear and self-contained, but it does not distinguish itself from close siblings like lsp_definition or vscode_find_references, which an agent could easily confuse it with.

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 'exact, not text search' clause implicitly tells the agent to prefer this over a text-based search, which is a form of usage context. However, it never names an alternative tool or states when-not-to-use, and the presence of lsp_definition and vscode_find_references as siblings leaves the routing decision to inference.

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