@@ -120,10 +120,12 @@ async def test_get_all_function_tools_can_prefix_with_server_name():
120120
121121 tools = await agent .get_mcp_tools (run_context )
122122 tool_names = {tool .name for tool in tools }
123- assert tool_names == {"GitHub_MCP_Server_create_issue " , "linear_create_issue " }
123+ assert tool_names == {"mcp_18_GitHub_MCP_Server_create_issue " , "mcp_7_linear_create_issue " }
124124
125- github_tool = next (tool for tool in tools if tool .name == "GitHub_MCP_Server_create_issue" )
126- linear_tool = next (tool for tool in tools if tool .name == "linear_create_issue" )
125+ github_tool = next (
126+ tool for tool in tools if tool .name == "mcp_18_GitHub_MCP_Server_create_issue"
127+ )
128+ linear_tool = next (tool for tool in tools if tool .name == "mcp_7_linear_create_issue" )
127129 assert isinstance (github_tool , FunctionTool )
128130 assert isinstance (linear_tool , FunctionTool )
129131
@@ -165,7 +167,7 @@ async def test_get_all_function_tools_prefix_falls_back_for_empty_server_name_sl
165167 assert len (tools ) == 1
166168 prefixed_tool = tools [0 ]
167169 assert isinstance (prefixed_tool , FunctionTool )
168- assert prefixed_tool .name == "server_search "
170+ assert prefixed_tool .name == "mcp_7_server_search "
169171
170172 tool_context = ToolContext (
171173 context = None ,
@@ -197,7 +199,7 @@ async def test_get_all_function_tools_disambiguates_colliding_server_name_prefix
197199 tools = await agent .get_mcp_tools (run_context )
198200 tool_names = {tool .name for tool in tools }
199201 assert len (tool_names ) == 2
200- assert all (tool_name .startswith ("GitHub_MCP_Server_ " ) for tool_name in tool_names )
202+ assert all (tool_name .startswith ("mcp_27_GitHub_MCP_Server_ " ) for tool_name in tool_names )
201203 assert all (tool_name .endswith ("_create_issue" ) for tool_name in tool_names )
202204
203205 for idx , tool in enumerate (tools , start = 1 ):
@@ -287,7 +289,7 @@ def resolve_meta(context):
287289
288290 prefixed_tool = tools [0 ]
289291 assert isinstance (prefixed_tool , FunctionTool )
290- assert prefixed_tool .name == "GitHub_MCP_Server_create_issue "
292+ assert prefixed_tool .name == "mcp_18_GitHub_MCP_Server_create_issue "
291293
292294 tool_context = ToolContext (
293295 context = None ,
0 commit comments