feat(mcp): filter asset lists by certification - #42656
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #42656 +/- ##
==========================================
- Coverage 65.73% 65.73% -0.01%
==========================================
Files 2843 2843
Lines 162653 162670 +17
Branches 37239 37241 +2
==========================================
+ Hits 106916 106924 +8
- Misses 53644 53654 +10
+ Partials 2093 2092 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 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. |
|
The review suggestion is valid. Pydantic's default Would you like me to implement this change for the superset/mcp_service/chart/schemas.py |
Code Review Agent Run #5f2c3fActionable Suggestions - 0Additional Suggestions - 1
Filtered by Review RulesBito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
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 |
fd63bb4 to
440be3b
Compare
440be3b to
2bd1efc
Compare
Code Review Agent Run #3eeb90Actionable Suggestions - 0Additional Suggestions - 2
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 |
SUMMARY
Adds an optional tri-state
certifiedfield to the MCPlist_datasetsandlist_chartsrequest schemas:truereturns certified assets onlyfalsereturns uncertified assets onlyThe tools reuse Superset's existing dataset and chart certification filters, keeping their semantics aligned with the REST APIs. The schema descriptions explicitly recommend the filter when an agent needs governed semantic-layer assets.
Why
MCP consumers otherwise need to retrieve every visible dataset or chart and filter the response client-side. Server-side filtering makes governed asset discovery explicit and can reduce response tokens without changing defaults.
What
A small adapter binds MCP request values to Flask-AppBuilder custom filters, and the shared list core passes those filters to the DAO. Both dataset and chart list tools expose the same tri-state request field.
Blast radius
Limited to authenticated MCP dataset and chart list calls. Existing RBAC/base filters remain in place and run before the certification filter. No database, migration, RLS, workspace-isolation, UI, or feature-flag changes.
Risk & rollback
Low risk. Omitted values retain the prior DAO query path. The main risk is divergence from certification semantics, mitigated by reusing the existing REST filter classes. Rollback is a normal revert.
Review guidance
Start with the request fields in the chart and dataset schemas, then review the bound-filter adapter and tool wiring. The most important behavior is that
Nonedoes not install a custom filter.Eval evidence
The affected MCP unit suites pass 99/99. The full staging agent eval suite was not run because this OSS worktree has no deployed staging build/workspace target.
Cost & latency delta
No model, prompt, routing, or model-parameter changes (0). Omitted-filter requests execute the same asset query as before. Opt-in certified filtering adds one existing SQL predicate and reduces returned rows; no deployed before/after token or latency sample is available from this worktree.
Prompt / non-determinism
No prompt or model-routing changes. The tool schema description is deterministic and is covered by request/tool tests.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable; no UI changes.
TESTING INSTRUCTIONS
The tests cover
certified=true,certified=false, and omitted certification for both asset types.ADDITIONAL INFORMATION