-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Add a new MCP tool symbol_document that extracts all symbols (classes, methods, properties, fields, etc.) from a document using EnvDTE FileCodeModel.
Details
- Returns hierarchical list where classes contain their members
- Maps
vsCMElementkinds to a newSymbolKindenum - Input: file path
- Output:
List<SymbolInfo>with name, kind, location, children
Implementation Tasks
- Create
Shared/Models/SymbolModels.cswithSymbolKindenum,SymbolInfo,LocationInfo,WorkspaceSymbolResult,DefinitionResult,ReferencesResultDTOs - Add
GetDocumentSymbolsAsync(string path)toIVisualStudioRpcinRpcContracts.cs - Add
GetDocumentSymbolsAsynctoIVisualStudioService.cs - Implement
GetDocumentSymbolsAsyncinVisualStudioService.csusing FileCodeModel - Add helper method
MapElementKind(vsCMElement)for enum conversion - Add helper method
ConvertCodeElement(CodeElement, string)for recursive extraction - Add forwarding method in
RpcServer.cs - Add proxy method in
RpcClient.cs - Create
Server/Tools/NavigationTools.cswithsymbol_documenttool - Add
NavigationToolsto tool discovery inRpcClient.GetAvailableToolsAsync() - Build and verify no errors
Notes
This is Phase 1 of the LSP-style navigation tools feature. Establishes the FileCodeModel pattern and creates shared DTOs used by subsequent tools.
Metadata
Metadata
Assignees
Labels
No labels