datarobot_genai.drmcpbase.dynamic_tools.deployment.metadata
metadata
Pure metadata assembly for DataRobot deployment tools.
All functions in this module are pure: they take pre-fetched data as arguments and do not make any HTTP calls or access request context.
build_mcp_tool_metadata
build_mcp_tool_metadata(deployment: Deployment, info_payload: dict[str, Any] | None, supports_chat_api: bool) -> MetadataBase
Assemble a MetadataBase adapter from pre-fetched deployment data.
This is the pure counterpart to get_mcp_tool_metadata in drmcp. It takes data already fetched from the DR API and selects the appropriate adapter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deployment
|
Deployment
|
The DataRobot deployment object. |
required |
info_payload
|
dict[str, Any] | None
|
The normalised response from directAccess/info/, or None when the deployment is a native DataRobot structured prediction model that does not expose this endpoint. |
required |
supports_chat_api
|
bool
|
Whether the deployment advertises chat completions support (from the capabilities endpoint). Ignored when info_payload is None. |
required |
Returns
MetadataBase adapter instance.
Raises
ValueError: If info_payload is required but not provided.