Skip to content

Commit c253b2e

Browse files
fastmcp>=3
1 parent a19e23c commit c253b2e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/mcp/test_server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515

1616
async def get_mcp_tools():
17-
return set(await get_core_mcp().get_tools())
17+
core_mcp = get_core_mcp()
18+
if hasattr(core_mcp, "get_tools"): # fastmcp < 3
19+
return set(await core_mcp.get_tools())
20+
# fastmcp >= 3
21+
return {tool.name for tool in await core_mcp.list_tools()}
1822

1923

2024
async def get_mcp_tool(tool_name):

0 commit comments

Comments
 (0)