Skip to content

Commit d028116

Browse files
Nikita BelliniNikita Bellini
authored andcommitted
Format
1 parent 8fec9d2 commit d028116

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/mcp/server/fastmcp/server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,10 @@ async def list_tools(self) -> list[MCPTool]:
252252
tools.extend(await self._runtime_mcp_tools_generator())
253253

254254
# Check if there are no duplicated tools
255-
if len(tools) != len(set([tool.name for tool in tools])):
255+
if len(tools) != len({tool.name for tool in tools}):
256256
raise Exception(
257-
"There are duplicated tools. Check the for tools with the same name both static and generated at runtime."
257+
"There are duplicated tools. Check the for tools"
258+
"with the same name both static and generated at runtime."
258259
)
259260

260261
return [

tests/server/fastmcp/test_runtime_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import pytest
44

55
from mcp.server.fastmcp import FastMCP
6-
from mcp.shared.memory import create_connected_server_and_client_session
76
from mcp.server.fastmcp.tools.base import Tool
7+
from mcp.shared.memory import create_connected_server_and_client_session
88
from mcp.types import TextContent
99

1010

0 commit comments

Comments
 (0)