MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / build_default_registry

Function build_default_registry

src/tool_system/defaults.py:9–35  ·  view source on GitHub ↗
(
    *,
    include_user_tools: bool = True,
    provider: "Any | None" = None,
    get_available_mcp_servers: Callable[[], list[str]] | None = None,
)

Source from the content-addressed store, hash-verified

7
8
9def build_default_registry(
10 *,
11 include_user_tools: bool = True,
12 provider: "Any | None" = None,
13 get_available_mcp_servers: Callable[[], list[str]] | None = None,
14) -> ToolRegistry:
15 registry = ToolRegistry()
16 for tool in ALL_STATIC_TOOLS:
17 registry.register(tool)
18 registry.register(
19 make_agent_tool(
20 registry,
21 provider=provider,
22 get_available_mcp_servers=get_available_mcp_servers,
23 )
24 )
25 registry.register(make_tool_search_tool(registry))
26
27 # Dynamic workflows. Registered unconditionally (like the Agent tool, which
28 # also needs the registry + provider); the tool's ``is_enabled`` is the
29 # single runtime gate (``get_tools`` filters by it fresh), so a ``/config``
30 # toggle of ``disable_workflows`` takes effect without rebuilding the registry.
31 from .tools.workflow import make_workflow_tool
32
33 registry.register(make_workflow_tool(registry, provider=provider))
34
35 return registry

Calls 5

registerMethod · 0.95
ToolRegistryClass · 0.85
make_agent_toolFunction · 0.85
make_tool_search_toolFunction · 0.85
make_workflow_toolFunction · 0.85