datarobot_genai.drmcputils.categories
categories
Pre-defined MCP tool categories for header-based filtering.
Categories allow agents and the DR platform to request logical groups of tools
via the x-datarobot-mcp-tools header instead of enumerating individual
tool names. Parents expand to all their leaf children; leaves expand to the
set of tool function names they contain. Anything that does not match a known
category is kept as-is (treated as a plain tool name).
Hierarchy
dr_connectors dr_connector_confluence dr_connector_jira dr_connector_gdrive dr_connector_microsoft_sharepoint_onedrive dr_web_search dr_web_search_perplexity dr_web_search_tavily dr_documentation (leaf — no sub-categories) dr_use_cases (leaf — no sub-categories) dr_predictive dr_catalog dr_modeling dr_predictions dr_deployments (leaf — no sub-categories) dr_development dr_workload dr_file dr_visual dr_mcpapps dr_panels dr_db dr_vdb dr_proxied_user_mcp (global-mcp only — proxied user MCPs) dr_dynamic_tools (hosted tools — registered separately)
resolve_to_tool_names
Expand category names in entries to their constituent tool names.
Resolution rules (applied per entry): 1. Parent category → expand to all leaf categories → expand each to tool names 2. Leaf category → expand to its tool names 3. Anything else → kept as-is (treated as a plain tool name)
Unknown entries (typos, future categories) are silently kept as plain strings. They will simply never match any registered tool name and the filter will ignore them — no error is raised.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entries
|
frozenset[str]
|
Raw strings parsed from the |
required |
Returns
Resolved set of tool function names (plain strings only).
Source code in datarobot_genai/drmcputils/categories.py
parse_tool_allowlist_header
Parse the x-datarobot-mcp-tools header and resolve any category names.
Category names (e.g. dr_connectors, dr_connector_jira) are expanded
to the set of tool function names they contain. Plain tool names and unknown
entries are kept as-is. Returns None when the header is absent or blank,
meaning no tool filtering should be applied.
Source code in datarobot_genai/drmcputils/categories.py
categories_for_tool
Return the sorted category labels (leaf + parent) for tool_name.
Empty list for hosted/dynamic tools and any name not in the static taxonomy.