get_document_highlights
Find all occurrences of a symbol at a given position within the same file via LSP document highlights. Identify local usages of variables, parameters, or fields without triggering a workspace-wide reference search.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"line": "<line>",
"column": "<column>"
},
"name": "get_document_highlights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| column | Yes | ||
| file_path | Yes | ||
| language_id | No |