diff --git a/libs/arcade-cli/arcade_cli/new.py b/libs/arcade-cli/arcade_cli/new.py index 7c40396c..dd5c7951 100644 --- a/libs/arcade-cli/arcade_cli/new.py +++ b/libs/arcade-cli/arcade_cli/new.py @@ -19,14 +19,14 @@ try: ARCADE_MCP_MAX_VERSION = str(int(ARCADE_MCP_MIN_VERSION.split(".")[0]) + 1) + ".0.0" except Exception as e: console.print(f"[red]Failed to get arcade-mcp version: {e}[/red]") - ARCADE_MCP_MIN_VERSION = "1.5.0" # Default version if unable to fetch + ARCADE_MCP_MIN_VERSION = "1.5.1" # Default version if unable to fetch ARCADE_MCP_MAX_VERSION = "2.0.0" ARCADE_TDK_MIN_VERSION = "3.0.0" ARCADE_TDK_MAX_VERSION = "4.0.0" ARCADE_SERVE_MIN_VERSION = "3.0.0" ARCADE_SERVE_MAX_VERSION = "4.0.0" -ARCADE_MCP_SERVER_MIN_VERSION = "1.7.0" +ARCADE_MCP_SERVER_MIN_VERSION = "1.7.2" ARCADE_MCP_SERVER_MAX_VERSION = "2.0.0" diff --git a/libs/arcade-core/arcade_core/catalog.py b/libs/arcade-core/arcade_core/catalog.py index a29e6220..82f9893f 100644 --- a/libs/arcade-core/arcade_core/catalog.py +++ b/libs/arcade-core/arcade_core/catalog.py @@ -266,22 +266,37 @@ class ToolCatalog(BaseModel): output_model=output_model, ) - def add_module(self, module: ModuleType, name: str | None = None) -> None: + def add_module( + self, + module: ModuleType, + name: str | None = None, + version: str | None = None, + description: str | None = None, + ) -> None: """ Add all the tools in a module to the catalog. Args: module: The module to add. name: Optionally override the name of the toolkit with this parameter + version: Optionally override the version of the toolkit with this parameter + description: Optionally override the description of the toolkit with this parameter """ toolkit = Toolkit.from_module(module) if name: toolkit.name = name - self.add_toolkit(toolkit) + self.add_toolkit(toolkit, version=version, description=description) - def add_toolkit(self, toolkit: Toolkit) -> None: + def add_toolkit( + self, toolkit: Toolkit, version: str | None = None, description: str | None = None + ) -> None: """ Add the tools from a loaded toolkit to the catalog. + + Args: + toolkit: The toolkit to add. + version: Optionally override the version of the toolkit with this parameter + description: Optionally override the description of the toolkit with this parameter """ if str(toolkit).lower() in self._disabled_toolkits: @@ -293,7 +308,13 @@ class ToolCatalog(BaseModel): try: module = import_module(module_name) tool_func = getattr(module, tool_name) - self.add_tool(tool_func, toolkit, module) + self.add_tool( + tool_func, + toolkit, + module, + toolkit_version=version, + toolkit_description=description, + ) except ToolDefinitionError as e: raise e.with_context(tool_name) from e except ToolkitLoadError as e: diff --git a/libs/arcade-core/pyproject.toml b/libs/arcade-core/pyproject.toml index e9e60fa2..b8db000b 100644 --- a/libs/arcade-core/pyproject.toml +++ b/libs/arcade-core/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arcade-core" -version = "3.3.2" +version = "3.3.3" description = "Arcade Core - Core library for Arcade platform" readme = "README.md" license = {text = "MIT"} diff --git a/libs/arcade-mcp-server/arcade_mcp_server/mcp_app.py b/libs/arcade-mcp-server/arcade_mcp_server/mcp_app.py index 12ec53a2..12bc18bb 100644 --- a/libs/arcade-mcp-server/arcade_mcp_server/mcp_app.py +++ b/libs/arcade-mcp-server/arcade_mcp_server/mcp_app.py @@ -110,14 +110,18 @@ class MCPApp: # Public handle to the MCPServer (set by caller for runtime ops) self.server: MCPServer | None = None - self._mcp_settings = MCPSettings( - server=ServerSettings( - name=self._name, - version=self.version, - title=self.title, - instructions=self.instructions, - ) - ) + server_settings_kwargs = { + "name": self._name, + "version": self.version, + "title": self.title, + } + if self.instructions: + server_settings_kwargs["instructions"] = self.instructions + + self._mcp_settings = MCPSettings(server=ServerSettings(**server_settings_kwargs)) + + # Store the actual instructions that ended up in ServerSettings + self.instructions = self._mcp_settings.server.instructions self._load_env() if not logger._core.handlers: # type: ignore[attr-defined] @@ -249,7 +253,9 @@ class MCPApp: def add_tools_from_module(self, module: ModuleType) -> None: """Add all the tools in a module to the catalog.""" - self._catalog.add_module(module, self._toolkit_name) + self._catalog.add_module( + module, self._toolkit_name, version=self.version, description=self.instructions + ) def tool( self, diff --git a/libs/arcade-mcp-server/pyproject.toml b/libs/arcade-mcp-server/pyproject.toml index 58a285fb..c7d05b8d 100644 --- a/libs/arcade-mcp-server/pyproject.toml +++ b/libs/arcade-mcp-server/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "arcade-mcp-server" -version = "1.7.1" +version = "1.7.2" description = "Model Context Protocol (MCP) server framework for Arcade.dev" readme = "README.md" authors = [{ name = "Arcade.dev" }] @@ -21,7 +21,7 @@ classifiers = [ ] requires-python = ">=3.10" dependencies = [ - "arcade-core>=3.3.2,<4.0.0", + "arcade-core>=3.3.3,<4.0.0", "arcade-serve>=3.0.0,<4.0.0", "arcade-tdk>=3.0.0,<4.0.0", "arcadepy>=1.5.0", diff --git a/pyproject.toml b/pyproject.toml index db1cad14..36f04fa4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arcade-mcp" -version = "1.5.0" +version = "1.5.1" description = "Arcade.dev - Tool Calling platform for Agents" readme = "README.md" license = {file = "LICENSE"} @@ -21,8 +21,8 @@ requires-python = ">=3.10" dependencies = [ # CLI dependencies - "arcade-mcp-server>=1.7.0,<2.0.0", - "arcade-core>=3.0.0,<4.0.0", + "arcade-mcp-server>=1.7.2,<2.0.0", + "arcade-core>=3.3.3,<4.0.0", "typer==0.10.0", "rich==13.9.4", "Jinja2==3.1.6", @@ -42,7 +42,7 @@ all = [ "pytz>=2024.1", "python-dateutil>=2.8.2", # mcp - "arcade-mcp-server>=1.7.0,<2.0.0", + "arcade-mcp-server>=1.7.2,<2.0.0", # serve "arcade-serve>=3.0.0,<4.0.0", # tdk