- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.6k
 
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Description
Problem Statement
When using multiple MCP servers or toolkits with the same tool names, naming conflicts can occur. Additionally, when the same MCP tool is used across multiple
environments (e.g., dev, staging, prod), the model has no way to distinguish which environment a tool invocation targets.
Use Cases
- Avoid naming conflicts: When using multiple MCP servers that have tools with the same names
 - Environment identification: Help the model distinguish between different environments
- Example: 
dev_get_data,staging_get_data,prod_get_data 
 - Example: 
 - Multi-toolkit organization: Better organize tools when using multiple MCP toolkits simultaneously
 
Proposed Solution
Add a tool_name_prefix parameter to the MCPTools class that allows users to namespace their MCP tools by adding a custom prefix to tool names.
The feature adds:
- A new 
tool_name_prefix: str = ""parameter toMCPTools.__init__() - Automatic prefixing of tool names with underscore separator (e.g., 
prefix_toolname) - Backward compatibility (empty string default means no prefix)
 
Alternatives Considered
No response
Additional Context
Example Usage
from agno.tools.mcp import MCPTools
# Development environment tools
dev_tools = MCPTools(
    server_params=dev_server_params,
    tool_name_prefix="dev"
)
# Production environment tools
prod_tools = MCPTools(
    server_params=prod_server_params,
    tool_name_prefix="prod"
)
# Now tools are namespaced: dev_get_data, prod_get_data, etc.
Benefits
- ✅ Prevents tool name collisions
- ✅ Improves model's ability to select the correct tool
- ✅ Better organization for complex multi-environment setups
- ✅ Backward compatible (no breaking changes)
### Would you like to work on this?
- [x] Yes, I’d love to work on it!
- [ ] I’m open to collaborating but need guidance.
- [ ] No, I’m just sharing the idea.Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request