Skip to content

datarobot_genai.drmcp.core.dynamic_tools.deployment.config

config

Configuration assembly for DataRobot deployment tools.

This module creates complete ExternalToolRegistrationConfig objects from DataRobot deployments by combining data fetched via request_user_dr_client with the pure assembly functions from drmcpbase.

create_deployment_tool_config

create_deployment_tool_config(deployment: Deployment) -> ExternalToolRegistrationConfig

Create an ExternalToolRegistrationConfig from deployment.

Fetches the user's DR client (endpoint + token) and delegates to the pure drmcpbase assembly functions.

Parameters:

Name Type Description Default
deployment Deployment

The DataRobot deployment object.

required
Returns
ExternalToolRegistrationConfig with all parameters needed for registration.
Source code in datarobot_genai/drmcp/core/dynamic_tools/deployment/config.py
def create_deployment_tool_config(
    deployment: dr.Deployment,
) -> ExternalToolRegistrationConfig:
    """Create an ExternalToolRegistrationConfig from deployment.

    Fetches the user's DR client (endpoint + token) and delegates to the
    pure drmcpbase assembly functions.

    Args:
        deployment: The DataRobot deployment object.

    Returns
    -------
        ExternalToolRegistrationConfig with all parameters needed for registration.
    """
    metadata = get_mcp_tool_metadata(deployment)

    with request_user_dr_client(headers_auth_only=False) as api_client:
        base_url = get_deployment_base_url(deployment, api_client.endpoint)
        auth_headers = build_deployment_auth_headers(deployment, api_client.token)

    return assemble_deployment_tool_config(deployment, metadata, base_url, auth_headers)