-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Add a new MCP tool goto_definition that finds where a symbol at a given position is defined.
Details
- Input: file path, line, column
- Uses
DTE.ExecuteCommand("Edit.GoToDefinition")after positioning cursor - Captures resulting document/position as definition location
- Returns
DefinitionResultwith location(s) and symbol info
Implementation Tasks
- Add
GoToDefinitionAsync(string path, int line, int column)toIVisualStudioRpcinRpcContracts.cs - Add
GoToDefinitionAsynctoIVisualStudioService.cs - Implement
GoToDefinitionAsyncinVisualStudioService.cs - Handle document opening and cursor positioning
- Execute Edit.GoToDefinition command
- Capture resulting location
- Handle edge cases (no definition found, external code)
- Add forwarding method in
RpcServer.cs - Add proxy method in
RpcClient.cs - Add
goto_definitiontool method toNavigationTools.cs - Build and verify no errors
Limitations
- Cannot navigate to external/NuGet assemblies without source
- Partial classes may only return one location
Dependencies
- Requires feat(tools): add symbol_document navigation tool #13 (symbol_document) for SymbolModels DTOs
Notes
This is Phase 3 of the LSP-style navigation tools feature.
Metadata
Metadata
Assignees
Labels
No labels