aminghadersohi opened a new pull request, #41922:
URL: https://github.com/apache/superset/pull/41922
### SUMMARY
Fixes several documentation/metadata inconsistencies found in a review of
the MCP (Model Context Protocol) service (`superset/mcp_service/`). No tool
behavior changes.
- `update_chart`'s preview-first behavior (default `generate_preview=True`
returns a cached preview and does not persist) is intentional, but
`DEFAULT_INSTRUCTIONS` in `app.py` described it as if it always applies
changes. Updated the instructions to clarify persistence only happens with
`generate_preview=False`.
- Fixed a stale comment in `generate_chart.py` ("Save chart by default")
that contradicted the actual `save_chart=False` default.
- Added `get_chart_type_schema` and the 4 semantic-layer tools
(`list_metrics`, `get_table`, `get_compatible_dimensions`,
`get_compatible_metrics`) to the "Available tools" section of
`DEFAULT_INSTRUCTIONS`, which had omitted them since they were added.
- Advertised the `superset://schema/{chart,dataset,dashboard,all}` resources
in the "Available Resources" section of `DEFAULT_INSTRUCTIONS`, which only
listed 2 of the 6 registered resources.
- Synced the filter-column lists in the `list_charts` and `list_dashboards`
docstrings with their actual Pydantic schemas (both were missing `editor`;
`list_charts` was also missing `dashboards`).
- Added `class_permission_name="Chart"` to `get_chart_type_schema`, the only
one of 62 tools missing this annotation.
- Aligned `destructiveHint` values across mutating tools: `update_dashboard`
persists immediately so it should be `True` (was `False`);
`update_chart_preview` only writes to cache and never persists so it should be
`False` (was `True`).
- Changed `get_dashboard_datasets`'s tag from `core` to `discovery` to match
its sibling get-info tools.
- Fixed doc drift in `superset/mcp_service/CLAUDE.md`, which showed
`health_check` as an example of an unprotected (`protect=False`) tool when it
is actually a protected tool.
### TESTING INSTRUCTIONS
- `pytest tests/unit_tests/mcp_service/` — full suite passes (2667 passed)
- `pre-commit run` on all changed files — mypy, ruff, ruff-format, pylint
all pass
### 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: [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]