Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: update main.js#3

Merged
andrewpareles merged 1 commit intovoideditor:mainfrom
eltociear:patch-1
Sep 17, 2024
Merged

chore: update main.js#3
andrewpareles merged 1 commit intovoideditor:mainfrom
eltociear:patch-1

Conversation

@eltociear
Copy link
Contributor

Siwtch -> Switch

Siwtch -> Switch
@andrewpareles andrewpareles merged commit 44106b0 into voideditor:main Sep 17, 2024
andrewpareles pushed a commit that referenced this pull request Mar 21, 2025
EdibleTuber added a commit to EdibleTuber/void_MCP_Tool_Fix that referenced this pull request Nov 26, 2025
This commit fixes three critical bugs in the MCP (Model Context Protocol)
integration that prevented MCP tools from being available to the LLM:

**Bug voideditor#1: MCP server not added to internal list when toggled ON**
- Fixed in mcpChannel.ts line 283
- When toggling an MCP server ON, the client connection was created but
  never stored in this.infoOfClientId[serverName]
- This caused tool calls to fail silently because the client reference
  was missing
- Solution: Added this.infoOfClientId[serverName] = clientInfo after
  creating the client

**Bug voideditor#2: Tool naming system used random prefixes**
- Fixed in mcpService.ts line 202 and mcpChannel.ts (removed lines 232-234)
- Original implementation used random 6-character prefixes (e.g.,
  a1b2c3_read_file)
- This made tools unpredictable and harder to debug
- Solution: Replaced with consistent server name prefix using __ separator
  (e.g., filesystem__read_file)
- Updated removeMCPToolNamePrefix() in mcpServiceTypes.ts to handle new
  format
- Updated Settings.tsx to use centralized removeMCPToolNamePrefix() helper

**Bug voideditor#3: Improved error handling in MCP channel**
- Fixed in mcpChannel.ts lines 109-122
- Errors in call() method returned undefined instead of proper error responses
- Solution: Return proper MCPToolErrorResponse for callTool command failures

**Additional improvements:**
- Added comprehensive debug logging in mcpChannel.ts, mcpService.ts,
  prompts.ts, and chatThreadService.ts
- Logging helps diagnose MCP integration issues and confirms tools are
  properly registered

**Testing:**
✅ MCP servers connect and show green status
✅ Tools are registered with predictable names
✅ Tools are callable and work correctly
✅ Tool calls route to the correct MCP server

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants