Commit 343ef32
LiryLee
fix: prevent MCP tool name collision by prefixing with server name
When multiple MCP servers expose tools with the same name (e.g.,
), selecting one would inadvertently select the other
because both backend registration and the frontend-facing API used
the raw tool name without any server identifier.
Fix:
- MCPTool.__init__: prefix tool name with
so each tool gets a unique identifier in func_list
- ToolsService.get_mcp_servers: return prefixed names in the
server info so the frontend can match correctly with availableTools
The actual MCP call still uses the original tool name
(self.mcp_tool.name), so server communication is unaffected.1 parent 372b9f5 commit 343ef32
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
| 689 | + | |
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments