π The fast, Pythonic way to build MCP servers and clients.
Remove unused arg (#1382)
Jeremiah Lowinaedb1993a2bc
diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.pyindex 3fd9fa9eb..493d10804 100644--- a/src/fastmcp/server/server.py+++ b/src/fastmcp/server/server.py@@ -140,19 +140,18 @@ class FastMCP(Generic[LifespanResultT]):]| None) = None,- tool_serializer: Callable[[Any], str] | None = None,- cache_expiration_seconds: float | None = None,- on_duplicate_tools: DuplicateBehavior | None = None,- on_duplicate_resources: DuplicateBehavior | None = None,- on_duplicate_prompts: DuplicateBehavior | None = None,+ dependencies: list[str] | None = None,resource_prefix_format: Literal["protocol", "path"] | None = None,mask_error_details: bool | None = None,tools: list[Tool | Callable[..., Any]] | None = None,tool_transformations: dict[str, ToolTransformConfig] | None = None,- dependencies: list[str] | None = None,+ tool_serializer: Callable[[Any], str] | None = None,include_tags: set[str] | None = None,exclude_tags: set[str] | None = None,include_fastmcp_meta: bool | None = None,+ on_duplicate_tools: DuplicateBehavior | None = None,+ on_duplicate_resources: DuplicateBehavior | None = None,+ on_duplicate_prompts: DuplicateBehavior | None = None,# ---# ---# --- The following arguments are DEPRECATED ---diff --git a/tests/deprecated/test_settings.py b/tests/deprecated/test_settings.pyindex 9e6f3c335..ad6a29a67 100644--- a/tests/deprecated/test_settings.py+++ b/tests/deprecated/test_settings.py@@ -176,7 +176,6 @@ class TestDeprecatedServerInitKwargs:server = FastMCP(name="TestServer",instructions="Test instructions",- cache_expiration_seconds=60.0,on_duplicate_tools="warn",on_duplicate_resources="error",on_duplicate_prompts="replace",diff --git a/tests/server/test_mount.py b/tests/server/test_mount.pyindex 1697bb125..9312f0d4e 100644--- a/tests/server/test_mount.py+++ b/tests/server/test_mount.py@@ -637,23 +637,9 @@ class TestDynamicChanges:sub_app._tool_manager._tools.pop("temp_tool")# The tool should no longer be accessible- # Refresh the cache by clearing ittools = await main_app.get_tools()assert "sub_temp_tool" not in tools- async def test_cache_expiration(self):- main_app = FastMCP("MainApp", cache_expiration_seconds=2)- sub_app = FastMCP("SubApp")- tools = await main_app.get_tools()- assert len(tools) == 0-- @sub_app.tool- def sub_tool():- return "sub_tool"-- tools = await main_app.get_tools()- assert len(tools) == 0-class TestResourcesAndTemplates:"""Test mounting with resources and resource templates."""