-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Add a new MCP tool find_references that finds all usages of a symbol at a given position.
Details
- Input: file path, line, column, maxResults
- Uses
DTE.Findobject for solution-wide search - Filters results to reduce false positives
- Returns
ReferencesResultwith list of locations
Implementation Tasks
- Add
FindReferencesAsync(string path, int line, int column, int maxResults)toIVisualStudioRpcinRpcContracts.cs - Add
FindReferencesAsynctoIVisualStudioService.cs - Implement
FindReferencesAsyncinVisualStudioService.cs - Get symbol name at specified position
- Configure DTE.Find for solution-wide search
- Execute search and collect results
- Add filtering logic to reduce false positives
- Implement maxResults limiting with Truncated flag
- Add forwarding method in
RpcServer.cs - Add proxy method in
RpcClient.cs - Add
find_referencestool method toNavigationTools.cs - Build and verify no errors
Limitations
- Text-based search may have false positives in comments/strings
- Performance may be slow on large solutions (mitigated with maxResults)
Dependencies
- Requires feat(tools): add symbol_document navigation tool #13 (symbol_document) for SymbolModels DTOs
Notes
This is Phase 4 of the LSP-style navigation tools feature. Most complex tool, benefits from patterns established in earlier phases.
Metadata
Metadata
Assignees
Labels
No labels