Use MCPApp name when adding tools from module (#664)

This commit is contained in:
Eric Gustin 2025-10-30 18:08:44 -07:00 committed by GitHub
parent de742ff4f1
commit 995a516d5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 5 deletions

View file

@ -255,11 +255,17 @@ class ToolCatalog(BaseModel):
output_model=output_model,
)
def add_module(self, module: ModuleType) -> None:
def add_module(self, module: ModuleType, name: 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
"""
toolkit = Toolkit.from_module(module)
if name:
toolkit.name = name
self.add_toolkit(toolkit)
def add_toolkit(self, toolkit: Toolkit) -> None:

View file

@ -1,6 +1,6 @@
[project]
name = "arcade-core"
version = "3.2.0"
version = "3.3.0"
description = "Arcade Core - Core library for Arcade platform"
readme = "README.md"
license = {text = "MIT"}

View file

@ -193,7 +193,7 @@ 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._catalog.add_module(module, self._toolkit_name)
def tool(
self,

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "arcade-mcp-server"
version = "1.6.0"
version = "1.6.1"
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.2.0,<4.0.0",
"arcade-core>=3.3.0,<4.0.0",
"arcade-serve>=3.0.0,<4.0.0",
"arcade-tdk>=3.0.0,<4.0.0",
"arcadepy>=1.5.0",