1Find all references to/usage of a symbol by name using the Language Server Protocol (LSP).
2
3WHEN TO USE THIS TOOL:
4
5- **ALWAYS USE THIS FIRST** when searching for where a function, method, variable, type, or constant is used
6- **DO NOT use grep/glob for symbol searches** - this tool is semantic-aware and much more accurate
7- Use when you need to find all usages of a specific symbol (function, variable, type, class, method, etc.)
8- More accurate than grep because it understands code semantics and scope
9- Finds only actual references, not string matches in comments or unrelated code
10- Helpful for understanding where a symbol is used throughout the codebase
11- Useful for refactoring or analyzing code dependencies
12- Good for finding all call sites of a function, method, type, package, constant, variable, etc.
13
14HOW TO USE:
15
16- Provide the symbol name (e.g., "MyFunction", "myVariable", "MyType")
17- Optionally specify a path to narrow the search to a specific directory
18- The tool will automatically find the symbol and locate all references
19
20FEATURES:
21
22- Returns all references grouped by file
23- Shows line and column numbers for each reference
24- Supports multiple programming languages through LSP
25- Automatically finds the symbol without needing exact position
26
27LIMITATIONS:
28
29- May not find references in files that haven't been opened or indexed
30- Results depend on the LSP server's capabilities
31
32TIPS:
33
34- **Use this tool instead of grep when looking for symbol references** - it's more accurate and semantic-aware
35- Simply provide the symbol name and let the tool find it for you
36- This tool understands code structure, so it won't match unrelated strings or comments