You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aminghadersohi (via GitHub)" <gi...@apache.org> on 2026/06/30 23:58:56 UTC

[PR] docs(mcp): document all 7 generate_chart chart_type values [superset]

aminghadersohi opened a new pull request, #41599:
URL: https://github.com/apache/superset/pull/41599

   ### SUMMARY
   The `generate_chart` MCP tool's docstring only documented `chart_type='xy'` and `chart_type='table'`, even though the underlying schema (`ChartConfig` discriminated union) has supported 5 additional chart types since #38375, #38402, and #38403: `pie`, `pivot_table`, `mixed_timeseries`, `handlebars`, and `big_number`.
   
   Because the docstring is the primary signal an LLM client sees before calling the tool, models reaching for natural chart-type names like `'line'`, `'bar'`, or `'pie'` directly as the `chart_type` value (instead of as a `kind` sub-field of `chart_type='xy'`, or simply being unaware `'pie'` was a valid discriminator at all) would hit the raw Pydantic discriminator validation error and loop through retries until timing out.
   
   This PR only updates the docstring β€” no schema, validation, or behavior changes:
   - Lists all 7 valid `chart_type` values with their required fields
   - Clarifies that `kind` (line/bar/area/scatter) is a sub-field of `chart_type='xy'`, not a chart_type itself
   - Adds a natural-language β†’ chart_type lookup table
   - Adds a pie chart example (previously only xy and table had examples)
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A β€” docstring-only change, not user-facing UI.
   
   ### TESTING INSTRUCTIONS
   1. `ruff format --check` / `ruff check` pass on the changed file
   2. Pre-commit hooks (mypy, ruff, pylint, docstring-first check) pass
   3. No tests assert on the literal docstring text; existing `tests/unit_tests/mcp_service/chart/tool/test_generate_chart.py` suite is unaffected since only the docstring (not schema or logic) changed
   
   ### 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
   - [ ] Removes existing feature or API


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4973078010

   ### <span aria-hidden="true">βœ…</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">πŸ”¨</span> Latest commit | dff2aa57d22309894f73b9ecc4e8bf5a38af4463 |
   |<span aria-hidden="true">πŸ”</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a568bbb93bbe60007f0441a |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41599--superset-docs-preview.netlify.app](https://deploy-preview-41599--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">πŸ“±</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQxNTk5LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.W2Fxi1FasVfalsMD7HZAC4vEgviaM8FmEpJY50cxHu0)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">πŸ€–</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#Dcs7DoMwDADQu3gmwqhpWnqDHsN2XEAiH5ksCHH3ZnvLu6BaSbXBB2AANsqydlPa8niImzCgn8ck1S2a1aipk5WsuVjkaLblpbeodS_nN_YY6BnezDw_mDUg4uuH3k8E9x8) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-41599--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41599:
URL: https://github.com/apache/superset/pull/41599#discussion_r3599230975


##########
superset/mcp_service/chart/tool/generate_chart.py:
##########
@@ -111,39 +111,55 @@ async def generate_chart(  # noqa: C901
 
     IMPORTANT: The 'chart_type' field in the config is a DISCRIMINATOR that determines
     which chart configuration schema to use. It MUST be included and MUST match the
-    other fields in your configuration:
+    other fields in your configuration. There are exactly 9 valid chart_type values,
+    listed below. Values such as 'line', 'bar', 'area', and 'scatter' are 'kind'
+    values WITHIN chart_type='xy', not chart_type values themselves:
 
-    - Use chart_type='xy' for charts with x and y axes (line, bar, area, scatter)
-      Required fields: y (x is optional β€” defaults to dataset's primary datetime column)
+    - chart_type='xy' for charts with x and y axes (line, bar, area, scatter).
+      Required fields: y (x is optional β€” defaults to dataset's primary
+      datetime column). Use 'kind' to pick line/bar/area/scatter
+      (default kind='line').
 
-    - Use chart_type='table' for tabular visualizations
+    - chart_type='table' for tabular visualizations.
       Required fields: columns
 
-    - Use chart_type='pie' for pie/donut charts
+    - chart_type='pie' for pie/donut charts.
       Required fields: dimension, metric
 
-    - Use chart_type='pivot_table' for pivot table visualizations
-      Required fields: rows, metrics
+    - chart_type='pivot_table' for pivot table visualizations.
+      Required fields: rows, metrics (columns is optional, for cross-tabs)
 
-    - Use chart_type='mixed_timeseries' for dual-axis time-series charts
-      Required fields: x, y, y_secondary
+    - chart_type='mixed_timeseries' for dual-axis time-series charts.
+      Required fields: x, y (primary metrics), y_secondary (secondary metrics)
 
-    - Use chart_type='handlebars' for custom template-based visualizations
+    - chart_type='handlebars' for custom template-based visualizations.
       Required fields: handlebars_template

Review Comment:
   **Suggestion:** The required-fields guidance for the Handlebars chart type is incomplete: with the default `query_mode='aggregate'`, validation also requires `metrics`, so documenting only `handlebars_template` will cause clients to submit payloads that fail at runtime. Update this section to describe the conditional requirement (`metrics` for aggregate mode, or `columns` for raw mode) so the docstring matches actual schema/validator behavior. [docstring mismatch]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Handlebars charts fail when using docstring-only guidance.
   - ⚠️ MCP clients may retry invalid handlebars requests repeatedly.
   - ⚠️ LLM tools mislearn required fields for handlebars charts.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction βœ… </b></summary>
   
   ```mdx
   1. From an MCP client, call the `generate_chart` tool implemented by `async def
   generate_chart()` in `superset/mcp_service/chart/tool/generate_chart.py:98`, constructing
   the request payload based on the docstring lines 135–136 which state that for
   `chart_type='handlebars'` the only required field is `handlebars_template`.
   
   2. Send a request like:
   
      `{"dataset_id": 1, "config": {"chart_type": "handlebars", "handlebars_template":
      "<ul>{{#each data}}<li>{{this.name}}</li>{{/each}}</ul>"}}`
   
      omitting both `metrics` and `columns` because the docstring does not document them as
      required.
   
   3. Inside `generate_chart`, the validation pipeline is invoked via
   `ValidationPipeline.validate_request_with_warnings(request.model_dump())` at
   `superset/mcp_service/chart/tool/generate_chart.py:187–191`, which calls
   `SchemaValidator.validate_request()` in
   `superset/mcp_service/chart/validation/schema_validator.py:40–56`.
   
   4. `SchemaValidator._pre_validate_chart_type()` at `schema_validator.py:110–88` fetches
   `HandlebarsChartPlugin` and calls its `pre_validate(config)` method defined in
   `superset/mcp_service/chart/plugins/handlebars.py:45–124`; that method uses `query_mode =
   config.get("query_mode", "aggregate")` (line 82) and, when `query_mode=="aggregate"`,
   requires `metrics` (lines 110–123) while the Pydantic schema `HandlebarsChartConfig` in
   `superset/mcp_service/chart/schemas.py:1282–103` also enforces metrics/columns via
   `validate_query_fields`. Because the request only includes `handlebars_template`,
   `pre_validate` returns a `ChartGenerationError` and `SchemaValidator.validate_request()`
   returns `is_valid=False`, causing `ValidationPipeline.validate_request_with_warnings()`
   (pipeline.py:47–50) and then `generate_chart()` to respond with a validation error instead
   of a chart preview. This mismatch between docstring (template-only required) and
   validators (template plus metrics/columns depending on query_mode) will cause any client
   following the docstring to consistently submit invalid handlebars chart configurations.
   ```
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=aadce721f42f4ba98d93db5c4514f477&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=aadce721f42f4ba98d93db5c4514f477&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/mcp_service/chart/tool/generate_chart.py
   **Line:** 135:136
   **Comment:**
   	*Docstring Mismatch: The required-fields guidance for the Handlebars chart type is incomplete: with the default `query_mode='aggregate'`, validation also requires `metrics`, so documenting only `handlebars_template` will cause clients to submit payloads that fail at runtime. Update this section to describe the conditional requirement (`metrics` for aggregate mode, or `columns` for raw mode) so the docstring matches actual schema/validator behavior.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41599&comment_hash=a4decd2954e4aaa4a36441c92c8015a0e3b13af6b8bd3ec89a9bfb448d36879e&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41599&comment_hash=a4decd2954e4aaa4a36441c92c8015a0e3b13af6b8bd3ec89a9bfb448d36879e&reaction=dislike'>πŸ‘Ž</a>



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4848977900

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41599?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 55.73%. Comparing base ([`35194fe`](https://app.codecov.io/gh/apache/superset/commit/35194fe4d59aa5dbf77a720c1b17e57c3aac0fae?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`4ce61b7`](https://app.codecov.io/gh/apache/superset/commit/4ce61b7d7ba3290a530a5d1fd98d936d8db100c9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #41599   +/-   ##
   =======================================
     Coverage   55.73%   55.73%           
   =======================================
     Files        2668     2668           
     Lines      147182   147182           
     Branches    33947    33947           
   =======================================
     Hits        82032    82032           
     Misses      64410    64410           
     Partials      740      740           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41599/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ” | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/41599/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.10% <ΓΈ> (ΓΈ)` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/41599/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.65% <ΓΈ> (ΓΈ)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/41599/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.71% <ΓΈ> (ΓΈ)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41599?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4848938652

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4997969603

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #41599:
URL: https://github.com/apache/superset/pull/41599


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #41599:
URL: https://github.com/apache/superset/pull/41599#discussion_r3561826862


##########
superset/mcp_service/chart/tool/generate_chart.py:
##########
@@ -110,30 +110,44 @@ async def generate_chart(  # noqa: C901
 
     IMPORTANT: The 'chart_type' field in the config is a DISCRIMINATOR that determines
     which chart configuration schema to use. It MUST be included and MUST match the
-    other fields in your configuration:
+    other fields in your configuration. There are exactly 7 valid chart_type values
+    β€” NOT 'line', 'bar', 'mixed_timeseries', etc. Those are 'kind' values WITHIN
+    chart_type='xy' (see below), not chart_type values themselves:

Review Comment:
   The docstring says chart_type is NOT "mixed_timeseries", but mixed_timeseries is listed as a valid chart_type just below and is defined in the ChartConfig discriminated union. This contradiction can mislead MCP clients/LLMs and cause avoidable validation retries.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4939303702

   <!-- Bito Reply -->
   The docstring in `superset/mcp_service/chart/tool/generate_chart.py` indeed contains a contradiction regarding `mixed_timeseries`. While the docstring lists `mixed_timeseries` as a valid `chart_type` in the bulleted list, the introductory text claims there are "exactly 7 valid chart_type values" and explicitly states that `mixed_timeseries` is NOT a valid `chart_type` value, which is confusing.
   
   To resolve this, the docstring should be updated to clarify that `mixed_timeseries` IS a valid `chart_type` value, consistent with its inclusion in the list and the `ChartConfig` discriminated union. The introductory text should be corrected to reflect the actual list of valid types.
   
   **superset/mcp_service/chart/tool/generate_chart.py**
   ```
   IMPORTANT: The 'chart_type' field in the config is a DISCRIMINATOR that determines
       which chart configuration schema to use. It MUST be included and MUST match the
       other fields in your configuration. There are valid chart_type values:
   
       - chart_type='xy' for charts with x and y axes (line, bar, area, scatter).
         Required fields: y (x is optional β€” defaults to dataset's primary
         datetime column). Use 'kind' to pick line/bar/area/scatter
         (default kind='line').
   
       - chart_type='table' for tabular visualizations.
         Required fields: columns
   
       - chart_type='pie' for pie/donut charts.
         Required fields: dimension, metric
   
       - chart_type='pivot_table' for pivot table visualizations.
         Required fields: rows, metrics (columns is optional, for cross-tabs)
   
       - chart_type='mixed_timeseries' for dual-axis time-series charts.
         Required fields: x, y (primary metrics), y_secondary (secondary metrics)
   
       - chart_type='handlebars' for custom template-based visualizations.
         Required fields: handlebars_template
   
       - chart_type='big_number' for single KPI metric displays.
         Required fields: metric
   ```


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #41599:
URL: https://github.com/apache/superset/pull/41599#discussion_r3581973352


##########
superset/mcp_service/chart/tool/generate_chart.py:
##########
@@ -110,30 +110,44 @@ async def generate_chart(  # noqa: C901
 
     IMPORTANT: The 'chart_type' field in the config is a DISCRIMINATOR that determines
     which chart configuration schema to use. It MUST be included and MUST match the
-    other fields in your configuration:
+    other fields in your configuration. There are exactly 7 valid chart_type values
+    β€” NOT 'line', 'bar', 'mixed_timeseries', etc. Those are 'kind' values WITHIN
+    chart_type='xy' (see below), not chart_type values themselves:

Review Comment:
   Fixed in dff2aa57d2: the intro now lists only line, bar, area, and scatter as xy kind values, while mixed_timeseries remains documented as one of the seven valid chart_type discriminators.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4974543719

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4940363961

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] docs(mcp): document all 7 generate_chart chart_type values, fix stale config comment [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #41599:
URL: https://github.com/apache/superset/pull/41599#issuecomment-4999079880

   Might want to investigate the "major" review comment above, @aminghadersohi. Just wanna make sure you noticed it.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org