Skip to content

datarobot_genai.drmcputils.global_mcp_tools

global_mcp_tools

Single source of truth for the tools global-mcp exposes.

Both consumers read from here, so they cannot drift:

  • the global-mcp registry (register_all_drtools) — which drtools packages to load;
  • the ARD catalog (get_global_mcp_prebuilt_tools) — which tools to advertise.

GLOBAL_MCP_PACKAGE_CATEGORIES replaces the per-package GLOBAL_MCP_ENABLED flags that used to live scattered across the drtools __init__ files. Enabling a package for global-mcp is now a one-line edit here: add its drtools package name mapped to the leaf categories it contributes. GLOBAL_MCP_EXCLUDED_TOOLS is a per-tool safety net — names listed there are never registered and never advertised, even if their package/category is enabled.

Lives in drmcputils (the lowest, fastmcp-free layer) beside the taxonomy it derives from, so every layer above — and the global-mcp registry — can import it. Imports only the taxonomy.

global_mcp_enabled_packages

global_mcp_enabled_packages() -> frozenset[str]

Return the drtools package names global-mcp registers.

Source code in datarobot_genai/drmcputils/global_mcp_tools.py
def global_mcp_enabled_packages() -> frozenset[str]:
    """Return the drtools package names global-mcp registers."""
    return frozenset(GLOBAL_MCP_PACKAGE_CATEGORIES)

global_mcp_leaf_categories

global_mcp_leaf_categories() -> frozenset[MCPToolCategory]

Return every leaf category contributed by the enabled packages.

Source code in datarobot_genai/drmcputils/global_mcp_tools.py
def global_mcp_leaf_categories() -> frozenset[MCPToolCategory]:
    """Return every leaf category contributed by the enabled packages."""
    return frozenset().union(*GLOBAL_MCP_PACKAGE_CATEGORIES.values())