aminghadersohi commented on code in PR #39922:
URL: https://github.com/apache/superset/pull/39922#discussion_r3203067152
##########
superset/mcp_service/chart/tool/generate_chart.py:
##########
@@ -175,7 +175,8 @@ async def generate_chart( # noqa: C901
- Set save_chart=True to permanently save the chart
- LLM clients MUST display returned chart URL to users
- Use numeric dataset ID or UUID (NOT schema.table_name format)
- - MUST include chart_type in config (either 'xy' or 'table')
+ - MUST include chart_type in config (one of: 'xy', 'table', 'pie',
+ 'pivot_table', 'mixed_timeseries', 'handlebars', 'big_number')
Review Comment:
Fixed in f746051 — updated to "Required fields: y (x is optional — defaults
to dataset's primary datetime column)".
##########
superset/mcp_service/app.py:
##########
@@ -222,10 +222,14 @@ def get_default_instructions(branding: str = "Apache
Superset") -> str:
- PT1H (hourly), P1D (daily), P1W (weekly), P1M (monthly), P1Y (yearly)
Chart Types in Existing Charts (viewable via list_charts/get_chart_info):
-- pie, big_number, big_number_total, funnel, gauge_chart
-- echarts_timeseries_line, echarts_timeseries_bar, echarts_timeseries_area
-- pivot_table_v2, heatmap_v2, sankey_v2, sunburst_v2, treemap_v2
-- word_cloud, world_map, box_plot, bubble, mixed_timeseries
+Each chart returned by list_charts / get_chart_info includes a
+chart_type_display_name field with a human-readable name. Use that name
+when referring to chart types — do NOT expose raw viz_type identifiers.
+Common display names: Line Chart, Bar Chart, Area Chart, Scatter Plot,
+Pie Chart, Table, Interactive Table, Pivot Table, Big Number,
+Big Number with Trendline, Mixed Timeseries Chart, Custom Template Chart,
+Funnel Chart, Gauge Chart, Heatmap, Sankey Chart, Sunburst, Treemap,
+Word Cloud, World Map, Box Plot, Bubble Chart.
Review Comment:
Fixed in f746051 — the instructions now clarify that
`chart_type_display_name` is populated only for the 7 generate_chart-supported
types and will be null for all other viz_types (Funnel, Gauge, Heatmap, etc.).
--
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]