-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem Description
After multiple MCP server restarts during a long conversation, some tools become unavailable while others continue to work.
Symptoms
excel_rangeandexcel_tablereturn: "Tool disabled by user or not available"excel_filecontinues to work in the same session- Session is confirmed active (
excel_file OpenandTestactions succeed) - Error originates from VS Code's tool framework, not from the MCP server
Observations
- The MCP server is running and responding correctly
- Active session confirmed with open workbook
- The "disabled" error comes from VS Code's internal tool framework, not the MCP server
- This occurred after multiple MCP server restarts during a long conversation
- Reloading VS Code window or starting a new chat session resolves the issue
Root Cause Analysis
This appears to be a VS Code MCP client issue where the tool registry becomes stale after server restarts:
- Partial tool re-registration: Some tools (
excel_file) remain registered while others (excel_range,excel_table) are marked disabled - Cached tool state not refreshing: VS Code's internal cache doesn't update properly on reconnect
- Race condition: Possible timing issue during server restart handshake
Investigation Points
VS Code MCP Client Side:
- Tool registration is handled by VS Code's
vscode.lm.registerMcpServerDefinitionProvider - When server restarts, VS Code should re-enumerate all tools via
tools/listMCP method - Some tools may be getting dropped during this re-enumeration
MCP Server Side:
- All 12 tools are registered via
[McpServerToolType]attributes - Tool discovery uses
.WithToolsFromAssembly()which reflects over the assembly - Server announces all tools atomically at startup
Workaround
For Users:
- Reload VS Code window: Ctrl+Shift+P then "Developer: Reload Window"
- Or start a new chat session
Possible Mitigations
- Extension-side health check: Periodically verify all tools are available
- Reconnect handler: Force tool re-registration when server connection is restored
- User notification: Detect partial tool availability and prompt for reload
Environment
- VS Code with GitHub Copilot Chat
- ExcelMCP VS Code extension
- Windows (required for Excel COM)
Notes
This may require coordination with VS Code team if the issue is in the MCP client implementation.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working