Commit 68410ba
committed
fix: forward original tool name to remote MCP servers
When tool-name-prefix is enabled, the gateway prefixes tool names
(e.g., 'new_page' becomes 'server__new_page'). However, when forwarding
the call to the remote server, the prefixed name was being sent instead
of the original name.
The remote server doesn't know about gateway prefixes and fails with
'tool not found'.
This fix:
1. Adds originalToolName parameter to mcpServerToolHandler
2. Passes the original tool.Name when creating handlers
3. Uses originalToolName when calling the remote server
Tested with custom MCP servers using explicit prefix configuration.1 parent 94b4ea8 commit 68410ba
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
0 commit comments