Skip to main content
Glama

lspFindReferences

Read-onlyIdempotent

Find all usages of a symbol in code using language server semantic analysis. Identify dependencies and assess impact before changing functions, classes, or variables.

Instructions

Find all usages of a symbol [LOCAL: LSP]

REQUIRES lineHint - call localSearchCode FIRST to get line number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queriesYesQueries for lspFindReferences (1-5 per call). Review schema before use. Batch independent symbols and use page for large result sets.
responseCharOffsetNoCharacter offset for top-level bulk response pagination across results[]. Use when a multi-query response was auto-paginated.
responseCharLengthNoCharacter budget for top-level bulk response pagination across results[]. Overrides the shared default for this call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesArray of results, one per input query, discriminated by status
responsePaginationNoPagination metadata for top-level bulk response pagination across results[]
Behavior4/5

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

Annotations already specify readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds useful behavioral details such as the requirement for lineHint, case-sensitivity of symbolName, and that includeDeclaration defaults to true, but does not contradict annotations.

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?

The description is well-structured with clear sections, bullet points, and examples. It is somewhat lengthy but each section is informative and front-loaded with the core purpose, making it easy to scan.

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?

Given the tool's complexity with multiple parameters and nested queries, the description covers prerequisites, common pitfalls, integration with other tools, and provides examples. An output schema exists, so return values are not required. The description is complete and actionable.

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 100% with detailed descriptions for each parameter. The description adds value by highlighting critical constraints like 'lineHint required (1-indexed)' and providing examples, enhancing understanding beyond the schema alone.

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?

The description clearly states 'Find all usages of a symbol' and provides examples like 'Where is X used?'. It distinguishes itself from siblings like lspCallHierarchy, which focuses on call relationships.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit <when> section, prerequisites from localSearchCode, <fromTool> and <toTool> dependencies, and a comparison with lspCallHierarchy, providing comprehensive guidance on when to use this tool vs alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bgauryy/octocode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server