aminghadersohi opened a new pull request, #38109:
URL: https://github.com/apache/superset/pull/38109
## Summary
MCP tool responses currently expose several fields that cause issues for AI
assistant clients:
- **`thumbnail_url`** on `DashboardInfo` — This is an internal API endpoint
(`/api/v1/dashboard/{id}/thumbnail/...`) that returns JSON metadata, not a
viewable image. AI chatbots present it as a clickable "Preview Image" link,
which shows raw JSON when clicked, confusing users.
- **`form_data`** and **`query_context`** on `ChartInfo` — These are
internal technical fields containing raw chart configuration JSON. They bloat
responses and cause chatbots to display unnecessary technical details to users.
- **`preview_url`** backward-compat field on `ChartPreview` — URL-based
screenshot previews are not supported (`URLPreviewStrategy` already returns an
error), so this field was dead code that could mislead AI clients.
- **`get_chart_info` docstring** misleadingly described the `url` field as a
"screenshot URL" when it actually links to the chart's explore page.
### Changes
1. Remove `thumbnail_url` from `DashboardInfo` schema and both serializer
functions
2. Remove `form_data` and `query_context` from `ChartInfo` schema and
serializer
3. Remove `preview_url` backward-compat field from `ChartPreview` and dead
URL preview code path in `get_chart_preview`
4. Fix `get_chart_info` docstring and `ChartInfo.url` field description
## Test plan
- [x] All 505 MCP unit tests pass
- [x] Verified `thumbnail_url` no longer appears in dashboard info responses
- [x] Verified `form_data`/`query_context` no longer appear in chart info
responses
- [x] Verified chart preview no longer includes dead URL preview code path
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]