find_references
Find every reference to a symbol in the workspace and return file path, line number, and source line for each occurrence. Provide a symbol name or file position to trace usages and dependencies.
Instructions
Find all references to a symbol across the entire workspace. Returns file path, line number, and the source line at each reference site. PREFER a name (uri + symbol_name) — plumb resolves the exact identifier position for you, avoiding off-by-one errors; a raw file position (uri + line + character) is the fallback and, when it lands off an identifier, is snapped to the enclosing symbol.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "find_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Absolute path, file:// URI, or workspace-relative path of the document containing the symbol | |
| line | No | Zero-based line number. Required when symbol_name is not provided. | |
| character | No | Zero-based character offset. Required when symbol_name is not provided. | |
| symbol_name | No | Symbol name to look up instead of a position — PREFERRED over line/character. Accepts plain name or ReceiverType.MethodName form. plumb resolves it against the file's symbols, avoiding the off-by-one and 'no identifier found' errors of a hand-computed position. When provided, line and character are not needed. | |
| include_declaration | No | Include the symbol's own declaration in results (default true) |