-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: Support adding a name prefix to MCPTool and MCPToolset #1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support adding a name prefix to MCPTool and MCPToolset #1226
Conversation
fe4d6c1 to
c055ecf
Compare
7eee2ef to
8542553
Compare
8542553 to
ed01db7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the changes in this file will cause the prefix to be added twice, given we already handled prefix prepending in base toolset, did you test it ?
I think the only changes needed in this file is
response = await session.call_tool(self._mcp_tool.name, arguments=args)
could you try and verify ?
| session = await self._mcp_session_manager.create_session(headers=headers) | ||
|
|
||
| response = await session.call_tool(self.name, arguments=args) | ||
| response = await session.call_tool(self._mcp_tool.name, arguments=args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besides this line, I feel all the other changes in this file are not necessary and will cause problem as I mentioned in the comment of the whole file, would you please try and test it ?
|
@calvingiles , just realized you acutally added this prefix feature in mcp tool before we added this feature generally in base_toolset. sorry for the delay, we are really short of hands. would you be able to adapt to the latest code base and address the comments ? |
|
close this PR as same function is implemented in #2823 |
Given the high occurrence of tool name collisions with MCP Servers (for example, creating an agent that support multiple IDEs will often result in multiple
list_directorytools) it is often desirable to be able to namespace MCP tools under a sensible server name. For mcp servers that do not follow this convention, this feature addition adds a simpletool_name_prefixargument that will be added to the names of theMCPToolorMCPToolset.