feat(mcp): make config optional in generate_explore_link#39559
Conversation
Allow callers to omit the chart config and get a default explore URL that opens the dataset in Superset without a preconfigured chart. This removes the need to construct a chart config when the user just wants to explore a dataset.
Code Review Agent Run #6cde5cActionable 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #39559 +/- ##
==========================================
- Coverage 64.18% 63.69% -0.50%
==========================================
Files 2592 2584 -8
Lines 138723 137052 -1671
Branches 32175 31504 -671
==========================================
- Hits 89045 87299 -1746
- Misses 48146 48221 +75
Partials 1532 1532
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. |
…xplore-config # Conflicts: # superset/mcp_service/chart/schemas.py # superset/mcp_service/explore/tool/generate_explore_link.py
|
Bito Automatic Review Skipped – PR Already Merged |
SUMMARY
generate_explore_linkrequiredconfigas a mandatory field, forcing LLMs to construct a chart config even when the user just wants to open a dataset in Explore.This PR makes
configoptional. When omitted, the tool validates the dataset exists and returns a default explore URL (/explore/?datasource_type=table&datasource_id=<id>) that opens the dataset in Superset with no preconfigured chart.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — backend-only MCP tool change, no UI.
TESTING INSTRUCTIONS
Unit tests:
Manual (via MCP client):
generate_explore_linkwith{"dataset_id": 1}— should return a dataset explore URL with no form_data.{"dataset_id": 99999}(nonexistent) — should return a dataset-not-found error.config— should behave exactly as before.ADDITIONAL INFORMATION
configare unaffected)