Skip to main content
Glama

get_document_highlights

Find all local occurrences of a symbol within a file to identify variable, parameter, or field usage without workspace-wide search overhead.

Instructions

Find all occurrences of the symbol at a position within the same file via LSP (textDocument/documentHighlight). Returns ranges and kinds: 1=Text, 2=Read, 3=Write. File-scoped and instant — does not trigger a workspace-wide reference search. Use this to find all local usages of a variable, parameter, or field without the overhead of get_references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
language_idNo
lineYes
columnYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it specifies the return format ('Returns ranges and kinds: 1=Text, 2=Read, 3=Write'), scope constraints ('File-scoped and instant'), and performance characteristics ('does not trigger a workspace-wide reference search'). It doesn't mention error conditions or rate limits, but covers essential operational context.

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?

The description is efficiently structured in two sentences: the first explains the core functionality and return values, the second provides usage guidance and sibling differentiation. Every sentence adds value with zero wasted words, and key information is front-loaded about what the tool does and returns.

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?

Given no annotations and no output schema, the description does well by explaining return values (ranges and kinds with numeric codes) and behavioral constraints. For a tool with 4 parameters but 0% schema coverage, it could better explain parameter semantics, but otherwise provides good context about operation scope, purpose, and alternatives to guide usage decisions.

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 description coverage is 0%, so the description must compensate. It implies parameters through context ('symbol at a position', 'same file') but doesn't explicitly explain any of the 4 parameters (file_path, language_id, line, column). The description adds some meaning about what the tool does with inputs, but doesn't fully document parameter purposes or formats, leaving significant gaps.

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 the tool's purpose with specific verbs ('find all occurrences', 'returns ranges and kinds') and resources ('symbol at a position', 'same file via LSP'). It explicitly distinguishes from sibling 'get_references' by specifying 'file-scoped and instant' vs 'workspace-wide reference search', making the distinction clear.

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 provides explicit guidance on when to use this tool ('Use this to find all local usages of a variable, parameter, or field') and when not to ('does not trigger a workspace-wide reference search'). It names the alternative tool ('get_references') and contrasts their scopes ('local usages' vs 'overhead of get_references'), offering clear usage context.

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/blackwell-systems/agent-lsp'

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