aminghadersohi opened a new pull request, #37389: URL: https://github.com/apache/superset/pull/37389
### SUMMARY Improves the MCP service's prompts, resources, and instructions for better LLM client usability: **Instructions (`app.py`):** - Separates chart types into "creatable" (via generate_chart) vs "viewable-only" (existing charts), preventing LLMs from attempting to create unsupported chart types like pie/funnel - Fixes incorrect resource URI reference (`chart/templates` -> `chart://configs`) - Adds recommended workflows section with step-by-step tool sequences - Clarifies when to use `generate_explore_link` vs `generate_chart` - Documents `time_grain` parameter options **Prompts:** - `create_chart_guided`: Removes unsupported `pie` from chart_type options, reduces verbosity by ~60%, adds concrete tool call examples with error recovery guidance - `quickstart`: Replaces generic intro with actionable workflows per user type (analyst/executive/developer), removes trailing question that LLMs can't respond to **Resources:** - `chart://configs`: Removes redundant `schema_reference` section (already in tool JSON Schema), adds `time_grain`, `stacked`, and `ag-grid-table` examples, removes hardcoded date - `instance://metadata`: Adds dataset/database IDs so LLMs can immediately call downstream tools, removes empty `popular_content`, fixes broad `except Exception` to catch specific exceptions - Schema resources: Adds meaningful column descriptions for ~40 model columns via fallback mapping **Preview formats:** - Removes unsupported `base64` and `interactive` from all `preview_formats` Literal types (base64 was explicitly skipped, interactive had no implementation) - Cleans up dead base64 skip code in `generate_chart.py` ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - Backend/MCP protocol changes only, no UI impact ### TESTING INSTRUCTIONS 1. Start the MCP service (`python -m superset.mcp_service`) 2. Connect with an MCP client (e.g., Claude Desktop) 3. Verify `health_check` works 4. Verify `list_datasets` and `get_dataset_info` work correctly 5. Verify chart creation with `generate_explore_link` using the documented config format 6. Read the `instance://metadata` resource and confirm it includes `available_datasets` and `available_databases` 7. Read the `chart://configs` resource and confirm new examples (stacked, time_grain, ag-grid-table) are present 8. Verify `get_chart_preview` rejects `base64` format gracefully (validation error expected) ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [x] Removes existing feature or API - Removes `base64` and `interactive` from preview format options (never implemented) -- 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]
