StatGPT Backend version
latest
What is the problem this feature will solve?
Follow-up to #480.
The UI Widget introduced in #480 needs the channel's datasets metadata to render properly. This data is currently only available through the /metadata/datasets service endpoint, which the widget cannot consume as part of the MCP flow.
We need to expose datasets metadata to the widget over the MCP server, without surfacing it to the model.
What is the proposed feature or solution?
Expose the /metadata/datasets data as an MCP tool that is visible to the MCP App only (mcp_visibility: ["app"]), so the widget can fetch datasets metadata while the Supreme Agent / model does not see the tool.
This mirrors the existing sdmx_query_app passthrough tool: an MCP-App-only tool backed by existing backend logic (reuse DataSetService.get_channel_dataset_schemas_with_last_updated), returning the same payload as the /metadata/datasets endpoint.
What alternatives have you considered?
- Leaving the widget to call the
/metadata/datasets REST endpoint directly — rejected; keeps widget data access outside the MCP flow and out of the per-channel tool/visibility configuration.
- Exposing the tool to the model as well — rejected; the model does not need dataset metadata through this path, so it should stay
app-only.
StatGPT Backend version
latest
What is the problem this feature will solve?
Follow-up to #480.
The UI Widget introduced in #480 needs the channel's datasets metadata to render properly. This data is currently only available through the
/metadata/datasetsservice endpoint, which the widget cannot consume as part of the MCP flow.We need to expose datasets metadata to the widget over the MCP server, without surfacing it to the model.
What is the proposed feature or solution?
Expose the
/metadata/datasetsdata as an MCP tool that is visible to the MCP App only (mcp_visibility: ["app"]), so the widget can fetch datasets metadata while the Supreme Agent / model does not see the tool.This mirrors the existing
sdmx_query_apppassthrough tool: an MCP-App-only tool backed by existing backend logic (reuseDataSetService.get_channel_dataset_schemas_with_last_updated), returning the same payload as the/metadata/datasetsendpoint.What alternatives have you considered?
/metadata/datasetsREST endpoint directly — rejected; keeps widget data access outside the MCP flow and out of the per-channel tool/visibility configuration.app-only.