-
Notifications
You must be signed in to change notification settings - Fork 6
Tools should be conditionally available based on connection state and LSP server capabilities #94
Copy link
Copy link
Open
1 / 21 of 2 issues completedOpen
1 / 21 of 2 issues completed
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently, all MCP tools are available immediately upon server initialization, regardless of:
- Whether a Neovim connection is established
- Whether the connected LSP server supports required capabilities
This causes:
- Unnecessary token usage when tools requiring connections are called prematurely
- Failed operations when LSP tools are invoked on servers lacking required capabilities
Solution
Implement dynamic tool availability using MCP's tool list change notifications:
- Connection-aware tools: Only make tools requiring connections available after a successful Neovim connection is established
- LSP capability validation: Only make LSP tools available after verifying the connected LSP server supports the required capabilities
- Dynamic updates: Use MCP's tool list change notifications to update available tools as connection state and capabilities change
Implementation approach
- Track connection state and LSP server capabilities
- Filter tool availability based on current state
- Send notifications when availability changes
- Update tool descriptors to include connection/capability requirements
This would eliminate wasted tokens and provide better user experience by only showing tools that can actually succeed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request