datarobot_genai.drmcpbase.panels.resources
resources
Panels exposed as read-only MCP resources.
The discovery/read surface for panels. URIs:
panels://{source}— list panels (metadata) in a sourcepanels://{source}/{panel_id}— a single panel's metadatapanels://{source}/{panel_id}/content— a panel's content (inline for Text/Json; a payload reference for Dataset/Chart)
All are read-only and gated on the per-user ENABLE_MCP_SANDBOX entitlement
(enforced inside each handler). The handlers live here in drmcpbase so both
DRMCP and global-mcp can register them onto their own FastMCP instance via
:func:register_panel_resources.
register_panel_resources
Register the panel resources onto mcp (a FastMCP instance).
Instance-passing rather than a module-global decorator: drmcpbase is a
shared layer with no mcp singleton, so each server (DRMCP, global-mcp) calls
this with its own instance. The handlers are registered unwrapped so FastMCP
sees the real coroutine functions and awaits them.