fix(mcp): Remove unsupported thumbnail/preview URLs and internal fields from MCP schemas#38109
Conversation
Code Review Agent Run #33d28aActionable Suggestions - 0Additional Suggestions - 12
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #38109 +/- ##
==========================================
+ Coverage 60.48% 66.43% +5.94%
==========================================
Files 1931 670 -1261
Lines 76236 51445 -24791
Branches 8568 5805 -2763
==========================================
- Hits 46114 34177 -11937
+ Misses 28017 15873 -12144
+ Partials 2105 1395 -710
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ds from MCP schemas - Remove thumbnail_url from DashboardInfo schema and serializers. This field exposed an internal API endpoint that returns JSON metadata, not a viewable image. AI chatbots presented it as a clickable link, confusing users with raw JSON output. - Remove form_data and query_context from ChartInfo schema. These are internal technical fields not useful for end users or AI assistants. They bloat responses and cause chatbots to display unnecessary technical information. - Remove preview_url backward-compat field from ChartPreview. URL-based screenshot previews are not supported (URLPreviewStrategy already returns an error), so this field was dead code. - Fix misleading get_chart_info docstring that described the URL field as a "screenshot URL" when it links to the explore page.
Remove unnecessary parentheses from @pytest.fixture() and @pytest.mark.asyncio() decorators to satisfy ruff linting rules.
21f8e26 to
dae2259
Compare
Code Review Agent Run #2ab1f2Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Summary
MCP tool responses currently expose several fields that cause issues for AI assistant clients:
thumbnail_urlonDashboardInfo— 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_dataandquery_contextonChartInfo— These are internal technical fields containing raw chart configuration JSON. They bloat responses and cause chatbots to display unnecessary technical details to users.preview_urlbackward-compat field onChartPreview— URL-based screenshot previews are not supported (URLPreviewStrategyalready returns an error), so this field was dead code that could mislead AI clients.get_chart_infodocstring misleadingly described theurlfield as a "screenshot URL" when it actually links to the chart's explore page.Changes
thumbnail_urlfromDashboardInfoschema and both serializer functionsform_dataandquery_contextfromChartInfoschema and serializerpreview_urlbackward-compat field fromChartPreviewand dead URL preview code path inget_chart_previewget_chart_infodocstring andChartInfo.urlfield descriptionTest plan
thumbnail_urlno longer appears in dashboard info responsesform_data/query_contextno longer appear in chart info responses