File size: 330 Bytes
d2bb213
 
 
0efec03
 
 
d2bb213
0efec03
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
"""MCP tools utils."""

from smolagents import Tool, ToolCollection


def process_mcp_tools(tool_collection: ToolCollection) -> list[Tool]:
    """Process the MCP tools to add a mcp prefix to the name."""
    mcp_tools = tool_collection.tools
    for tool in mcp_tools:
        tool.name = f"mcp_{tool.name}"
    return mcp_tools