datarobot_genai.drmcp.core.drtools_registry
drtools_registry
Registry loader for drtools functions decorated with tool_metadata.
register_drtools_function
Register a drtools tool function with the MCP server.
If metadata contains a feature_flag key, the named DR entitlement
is evaluated for the static container account at registration time via the
shared :func:is_tool_feature_enabled policy. When the flag is disabled —
or the check raises for any reason (DR API unavailable, network failure,
flag not provisioned) — registration is skipped (fail-closed) so the tool
does not appear in list_tools. The gating policy lives in drtools so
global-mcp's per-user registry reuses it; only the client differs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
func
|
Callable
|
The function to register |
required |
metadata
|
dict[str, Any]
|
Tool metadata (tags, name, description, feature_flag, etc.) |
required |
Source code in datarobot_genai/drmcp/core/drtools_registry.py
load_drtools_registry
Load and register all tools from a drtools module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module_name
|
str
|
Full module name (e.g., 'datarobot_genai.drtools.panels.tools') |
required |