on main help sign in
chore: change references description to match others
4efb4efkujtimiihoxha
internal/agent/tools/references.md+24−34
@@ -1,36 +1,26 @@
1Find all references to/usage of a symbol by name using the Language Server Protocol (LSP).
1Find all references to/usage of a symbol by name using the Language Server Protocol (LSP).
2
2
3−WHEN TO USE THIS TOOL:
3+<usage>
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−
14−HOW TO USE:
15−
16−- Provide the symbol name (e.g., "MyFunction", "myVariable", "MyType")
4+- Provide symbol name (e.g., "MyFunction", "myVariable", "MyType").
17−- Optionally specify a path to narrow the search to a specific directory
5+- Optional path to narrow search to a directory or file (defaults to current directory).
18−- The tool will automatically find the symbol and locate all references
6+- Tool automatically locates the symbol and returns all references.
19−
7+</usage>
20−FEATURES:
8+
21−
9+<features>
10+- Semantic-aware reference search (more accurate than grep/glob).
22−- Returns all references grouped by file
11+- Returns references grouped by file with line and column numbers.
23−- Shows line and column numbers for each reference
24−- Supports multiple programming languages through LSP
12+- Supports multiple programming languages via LSP.
25−- Automatically finds the symbol without needing exact position
13+- Finds only real references (not comments or unrelated strings).
26−
14+</features>
27−LIMITATIONS:
15+
28−
16+<limitations>
29−- May not find references in files that haven't been opened or indexed
17+- May not find references in files not opened or indexed by the LSP server.
30−- Results depend on the LSP server's capabilities
18+- Results depend on the capabilities of the active LSP providers.
31−
19+</limitations>
32−TIPS:
20+
33−
21+<tips>
34−- **Use this tool instead of grep when looking for symbol references** - it's more accurate and semantic-aware
22+- Use this first when searching for where a symbol is used.
35−- Simply provide the symbol name and let the tool find it for you
23+- Do not use grep/glob for symbol searches.
36−- This tool understands code structure, so it won't match unrelated strings or comments
24+- Narrow scope with the path parameter for faster, more relevant results.
25+- Use qualified names (e.g., pkg.Func, Class.method) for higher precision.
26+</tips>