-
Notifications
You must be signed in to change notification settings - Fork 16.5k
feat(mcp): add unified get_schema tool for schema discovery #36458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mcp): add unified get_schema tool for schema discovery #36458
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #36458 +/- ##
===========================================
+ Coverage 0 67.93% +67.93%
===========================================
Files 0 642 +642
Lines 0 47878 +47878
Branches 0 5226 +5226
===========================================
+ Hits 0 32527 +32527
- Misses 0 14070 +14070
- Partials 0 1281 +1281
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:
|
Addresses code review feedback: 1. mcp_core.py - Fix constructor parameter order - Move logger parameter before new optional all_columns/sortable_columns - Add list copy protection for mutable state (default_columns, search_columns) - Add property accessors for all_columns/sortable_columns that return copies 2. get_schema.py - Add defensive key lookup - Use .get() instead of direct dictionary access for model_type - Add error logging and helpful ValueError message for invalid types 3. list_* tools - Fix return type consistency - Use result.columns_requested instead of request.select_columns - Return validated Pydantic model via model_validate() instead of dict 4. test_dashboard_tools.py - Update test response parsing - Use json.loads(result.content[0].text) pattern for consistency - Match pattern used in test_get_schema.py and test_dataset_tools.py
- Fix fragile DAO filter handling in mcp_core.py with defensive checks - Fix JSON serialization risks in schema_discovery.py with safe helper - Fix brittle test assertions using issubset() pattern - Ensure Field(default_factory=list) for mutable defaults in schemas Co-Authored-By: Claude <noreply@anthropic.com>
Addresses code review feedback: 1. mcp_core.py - Fix constructor parameter order - Move logger parameter before new optional all_columns/sortable_columns - Add list copy protection for mutable state (default_columns, search_columns) - Add property accessors for all_columns/sortable_columns that return copies 2. get_schema.py - Add defensive key lookup - Use .get() instead of direct dictionary access for model_type - Add error logging and helpful ValueError message for invalid types 3. list_* tools - Fix return type consistency - Use result.columns_requested instead of request.select_columns - Return validated Pydantic model via model_validate() instead of dict 4. test_dashboard_tools.py - Update test response parsing - Use json.loads(result.content[0].text) pattern for consistency - Match pattern used in test_get_schema.py and test_dataset_tools.py
- Fix fragile DAO filter handling in mcp_core.py with defensive checks - Fix JSON serialization risks in schema_discovery.py with safe helper - Fix brittle test assertions using issubset() pattern - Ensure Field(default_factory=list) for mutable defaults in schemas Co-Authored-By: Claude <noreply@anthropic.com>
dabee71 to
386c0a6
Compare
Code Review Agent Run #b893a7Actionable Suggestions - 0Additional Suggestions - 7
Review 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 |
b478e81 to
e45fec1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #17856c
Actionable Suggestions - 1
-
superset/mcp_service/mcp_core.py - 1
- Blind exception catch too broad · Line 596-596
Additional Suggestions - 5
-
superset/mcp_service/system/tool/get_schema.py - 1
-
Async/Sync Mismatch in DB Calls · Line 140-140The async function calls synchronous database operations via core.run_tool(), which can block the event loop and hurt concurrency in an async MCP service. Consider refactoring ModelGetSchemaCore.run_tool to be async or wrapping the call in run_in_executor.
-
-
superset/mcp_service/dashboard/schemas.py - 1
-
Schema Validation Risk · Line 350-357Changing columns_requested and columns_loaded from Optional[List[str]] with default None to List[str] with default_factory=list alters the schema contract. If the underlying tool sets these fields to None, Pydantic will raise a ValidationError during response serialization, potentially breaking dashboard listing.
-
-
superset/mcp_service/chart/tool/__init__.py - 1
-
Incomplete cleanup · Line 19-19Removal of get_chart_available_filters is correct, but leaves stale references in schemas.py and docs. Update them to reference get_schema for consistency.
-
-
tests/unit_tests/mcp_service/system/tool/test_get_schema.py - 2
-
Incomplete assertion coverage · Line 201-225In test_get_schema_dashboard, the test checks 'dashboard_title' and 'changed_on' in sortable_columns but misses 'created_on'. Add an assertion for 'created_on' to match the full expected sortable columns list.
-
Incomplete test coverage · Line 339-344The test for dashboard sortable columns checks only some expected columns ('id', 'dashboard_title', 'slug', 'published') but misses 'changed_on' and 'created_on' which are defined in DASHBOARD_SORTABLE_COLUMNS. To ensure completeness, add assertions for the missing columns.
-
Review Details
-
Files reviewed - 24 · Commit Range:
e45fec1..e45fec1- superset/mcp_service/app.py
- superset/mcp_service/chart/schemas.py
- superset/mcp_service/chart/tool/__init__.py
- superset/mcp_service/chart/tool/get_chart_available_filters.py
- superset/mcp_service/chart/tool/list_charts.py
- superset/mcp_service/common/schema_discovery.py
- superset/mcp_service/dashboard/schemas.py
- superset/mcp_service/dashboard/tool/__init__.py
- superset/mcp_service/dashboard/tool/get_dashboard_available_filters.py
- superset/mcp_service/dashboard/tool/list_dashboards.py
- superset/mcp_service/dataset/schemas.py
- superset/mcp_service/dataset/tool/__init__.py
- superset/mcp_service/dataset/tool/get_dataset_available_filters.py
- superset/mcp_service/dataset/tool/list_datasets.py
- superset/mcp_service/mcp_core.py
- superset/mcp_service/system/resources/__init__.py
- superset/mcp_service/system/resources/schema_discovery.py
- superset/mcp_service/system/tool/__init__.py
- superset/mcp_service/system/tool/get_schema.py
- tests/unit_tests/mcp_service/chart/tool/test_list_charts.py
- tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
- tests/unit_tests/mcp_service/dataset/tool/test_dataset_tools.py
- tests/unit_tests/mcp_service/system/tool/test_get_schema.py
- tests/unit_tests/mcp_service/system/tool/test_mcp_core.py
-
Files skipped - 1
- superset/mcp_service/CLAUDE.md - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
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 documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
e45fec1 to
379fa24
Compare
✅ Deploy Preview for superset-docs-preview canceled.
|
90ca98e to
9ee83b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #8d0365
Actionable Suggestions - 2
-
superset/mcp_service/mcp_core.py - 2
- Test Schema Incompatibility · Line 212-213
- Avoid catching blind exceptions · Line 596-596
Additional Suggestions - 2
-
superset/mcp_service/dataset/tool/__init__.py - 1
-
Incomplete Function Removal · Line 18-18The import removal here indicates get_dataset_available_filters was deleted, but schema descriptions still reference it for allowed values, which could mislead users. It looks like the cleanup is incomplete.
-
-
superset/mcp_service/app.py - 1
-
Inconsistent schema documentation · Line 128-129The usage tips have been updated to reference get_schema for discovering filterable columns, but the schema descriptions in the Pydantic models still reference the removed get_chart_available_filters, get_dashboard_available_filters, and get_dataset_available_filters tools. This creates inconsistent documentation where users see outdated references in API schemas.
-
Review Details
-
Files reviewed - 24 · Commit Range:
90ca98e..90ca98e- superset/mcp_service/app.py
- superset/mcp_service/chart/schemas.py
- superset/mcp_service/chart/tool/__init__.py
- superset/mcp_service/chart/tool/get_chart_available_filters.py
- superset/mcp_service/chart/tool/list_charts.py
- superset/mcp_service/common/schema_discovery.py
- superset/mcp_service/dashboard/schemas.py
- superset/mcp_service/dashboard/tool/__init__.py
- superset/mcp_service/dashboard/tool/get_dashboard_available_filters.py
- superset/mcp_service/dashboard/tool/list_dashboards.py
- superset/mcp_service/dataset/schemas.py
- superset/mcp_service/dataset/tool/__init__.py
- superset/mcp_service/dataset/tool/get_dataset_available_filters.py
- superset/mcp_service/dataset/tool/list_datasets.py
- superset/mcp_service/mcp_core.py
- superset/mcp_service/system/resources/__init__.py
- superset/mcp_service/system/resources/schema_discovery.py
- superset/mcp_service/system/tool/__init__.py
- superset/mcp_service/system/tool/get_schema.py
- tests/unit_tests/mcp_service/chart/tool/test_list_charts.py
- tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
- tests/unit_tests/mcp_service/dataset/tool/test_dataset_tools.py
- tests/unit_tests/mcp_service/system/tool/test_get_schema.py
- tests/unit_tests/mcp_service/system/tool/test_mcp_core.py
-
Files skipped - 1
- superset/mcp_service/CLAUDE.md - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
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 documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
Code Review Agent Run #cd2cc0Actionable Suggestions - 0Additional Suggestions - 3
Review 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 |
9ee83b3 to
e918806
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #939d4a
Actionable Suggestions - 1
-
superset/mcp_service/mcp_core.py - 1
- Blind exception catch too broad · Line 596-596
Additional Suggestions - 1
-
superset/mcp_service/dataset/schemas.py - 1
-
Incorrect field description · Line 217-223The description mentions "if not specified" but the field has default_factory, so it's always specified. This misleads users about when defaults apply.
Code suggestion
diff --git a/superset/mcp_service/dataset/schemas.py b/superset/mcp_service/dataset/schemas.py index abc123..def456 100644 --- a/superset/mcp_service/dataset/schemas.py +++ b/superset/mcp_service/dataset/schemas.py @@ -220,7 +220,7 @@ class ListDatasetsRequest(MetadataCacheControl): Field( default_factory=list, - description="List of columns to select. Defaults to common columns if not specified.", + description="List of columns to select. If empty, defaults to common columns.", ), ]
-
Review Details
-
Files reviewed - 24 · Commit Range:
e918806..e918806- superset/mcp_service/app.py
- superset/mcp_service/chart/schemas.py
- superset/mcp_service/chart/tool/__init__.py
- superset/mcp_service/chart/tool/get_chart_available_filters.py
- superset/mcp_service/chart/tool/list_charts.py
- superset/mcp_service/common/schema_discovery.py
- superset/mcp_service/dashboard/schemas.py
- superset/mcp_service/dashboard/tool/__init__.py
- superset/mcp_service/dashboard/tool/get_dashboard_available_filters.py
- superset/mcp_service/dashboard/tool/list_dashboards.py
- superset/mcp_service/dataset/schemas.py
- superset/mcp_service/dataset/tool/__init__.py
- superset/mcp_service/dataset/tool/get_dataset_available_filters.py
- superset/mcp_service/dataset/tool/list_datasets.py
- superset/mcp_service/mcp_core.py
- superset/mcp_service/system/resources/__init__.py
- superset/mcp_service/system/resources/schema_discovery.py
- superset/mcp_service/system/tool/__init__.py
- superset/mcp_service/system/tool/get_schema.py
- tests/unit_tests/mcp_service/chart/tool/test_list_charts.py
- tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
- tests/unit_tests/mcp_service/dataset/tool/test_dataset_tools.py
- tests/unit_tests/mcp_service/system/tool/test_get_schema.py
- tests/unit_tests/mcp_service/system/tool/test_mcp_core.py
-
Files skipped - 2
- superset/mcp_service/CLAUDE.md - Reason: Filter setting
- superset/mcp_service/docs/tool-search-optimization.md - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
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 documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
e918806 to
fd6e792
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #ac5719
Actionable Suggestions - 1
-
superset/mcp_service/common/schema_discovery.py - 1
- Incorrect SQLAlchemy type mapping for date/time · Line 106-111
Additional Suggestions - 2
-
superset/mcp_service/dataset/schemas.py - 1
-
Schema default mismatch · Line 217-223The default_factory changed to list (empty), but the description still says 'Defaults to common columns if not specified.' This creates confusion, as the default is now empty, and the tool likely needs to handle empty as a signal to use common columns.
-
-
tests/unit_tests/mcp_service/system/tool/test_get_schema.py - 1
-
Incomplete test assertion · Line 334-340The test for chart sortable columns checks several expected values but misses 'description', which is present in the CHART_SORTABLE_COLUMNS constant. Adding this check improves test completeness.
-
Review Details
-
Files reviewed - 24 · Commit Range:
fd6e792..fd6e792- superset/mcp_service/app.py
- superset/mcp_service/chart/schemas.py
- superset/mcp_service/chart/tool/__init__.py
- superset/mcp_service/chart/tool/get_chart_available_filters.py
- superset/mcp_service/chart/tool/list_charts.py
- superset/mcp_service/common/schema_discovery.py
- superset/mcp_service/dashboard/schemas.py
- superset/mcp_service/dashboard/tool/__init__.py
- superset/mcp_service/dashboard/tool/get_dashboard_available_filters.py
- superset/mcp_service/dashboard/tool/list_dashboards.py
- superset/mcp_service/dataset/schemas.py
- superset/mcp_service/dataset/tool/__init__.py
- superset/mcp_service/dataset/tool/get_dataset_available_filters.py
- superset/mcp_service/dataset/tool/list_datasets.py
- superset/mcp_service/mcp_core.py
- superset/mcp_service/system/resources/__init__.py
- superset/mcp_service/system/resources/schema_discovery.py
- superset/mcp_service/system/tool/__init__.py
- superset/mcp_service/system/tool/get_schema.py
- tests/unit_tests/mcp_service/chart/tool/test_list_charts.py
- tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
- tests/unit_tests/mcp_service/dataset/tool/test_dataset_tools.py
- tests/unit_tests/mcp_service/system/tool/test_get_schema.py
- tests/unit_tests/mcp_service/system/tool/test_mcp_core.py
-
Files skipped - 2
- superset/mcp_service/CLAUDE.md - Reason: Filter setting
- superset/mcp_service/docs/tool-search-optimization.md - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
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 documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
- Consolidate 3 separate schema discovery tools into unified get_schema tool - Extract column metadata dynamically from SQLAlchemy models using inspect() - Add accurate type mapping for SQLAlchemy types (datetime, date, time separately) - Reduce hardcoded column definitions to minimal config (default/sortable/search) - Add extra columns for computed fields with explicit is_default=False - Update list tools to use dynamic column getters - Add MCP resources for schema discovery via resource URIs - Add comprehensive tests for schema validation and tool behavior - Update schema descriptions to reference get_schema instead of removed tools - Update documentation to reflect consolidated schema discovery - Add columns_available and sortable_columns to test schema 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fd6e792 to
24d9069
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #1b43c3
Actionable Suggestions - 1
-
superset/mcp_service/mcp_core.py - 1
- Blind exception catch too broad · Line 596-596
Additional Suggestions - 11
-
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py - 4
-
API Migration · Line 559-662Similar API migration in another test method, replacing result.data with json.loads(result.content[0].text).
-
Schema Validation · Line 547-562Test confirms ListDashboardsRequest defaults select_columns to empty list, triggering minimal defaults in the tool.
-
Feature Test · Line 553-562Test ensures explicit select_columns can include non-default fields like 'published' and 'charts', verifying tool flexibility.
-
Test Coverage · Line 523-546New test validates DASHBOARD_DEFAULT_COLUMNS constant matches expected minimal set, ensuring consistency between tool defaults and test expectations.
-
-
superset/mcp_service/common/schema_discovery.py - 1
-
Direct Attribute Access · Line 145-145For SQLAlchemy columns, directly access col.comment instead of using getattr, as comment is a standard attribute on Column objects.
-
-
tests/unit_tests/mcp_service/system/tool/test_mcp_core.py - 3
-
no-issue (tool-verified) · Line 20-20Adding Dict to typing imports is appropriate as it's used later in the file for filter_columns type hint.
-
no-issue (tool-verified) · Line 25-29Importing ModelGetSchemaCore aligns with existing test functions that use it, as seen in the file's test definitions.
-
no-issue (tool-verified) · Line 50-51Adding columns_available and sortable_columns fields matches the ModelListCore output schema, ensuring tests reflect actual implementation.
-
-
superset/mcp_service/chart/tool/__init__.py - 2
-
Verified Import Change · Line 19-19The import change removes the deprecated get_chart_available_filters and adds the new get_chart_data function. Both the removal and addition are correct, as the old function no longer exists and the new one is properly defined in its module.
-
Verified __all__ Update · Line 30-31The __all__ list update removes the deprecated get_chart_available_filters and adds the new update_chart and update_chart_preview functions. This maintains consistency with the imports and ensures proper module exports.
-
-
superset/mcp_service/system/tool/get_schema.py - 1
-
Docstring Parameter Mismatch · Line 134-134The docstring incorrectly documents 'model_type' as a direct argument, but the function takes a 'request' parameter of type GetSchemaRequest.
-
Review Details
-
Files reviewed - 24 · Commit Range:
24d9069..24d9069- superset/mcp_service/app.py
- superset/mcp_service/chart/schemas.py
- superset/mcp_service/chart/tool/__init__.py
- superset/mcp_service/chart/tool/get_chart_available_filters.py
- superset/mcp_service/chart/tool/list_charts.py
- superset/mcp_service/common/schema_discovery.py
- superset/mcp_service/dashboard/schemas.py
- superset/mcp_service/dashboard/tool/__init__.py
- superset/mcp_service/dashboard/tool/get_dashboard_available_filters.py
- superset/mcp_service/dashboard/tool/list_dashboards.py
- superset/mcp_service/dataset/schemas.py
- superset/mcp_service/dataset/tool/__init__.py
- superset/mcp_service/dataset/tool/get_dataset_available_filters.py
- superset/mcp_service/dataset/tool/list_datasets.py
- superset/mcp_service/mcp_core.py
- superset/mcp_service/system/resources/__init__.py
- superset/mcp_service/system/resources/schema_discovery.py
- superset/mcp_service/system/tool/__init__.py
- superset/mcp_service/system/tool/get_schema.py
- tests/unit_tests/mcp_service/chart/tool/test_list_charts.py
- tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
- tests/unit_tests/mcp_service/dataset/tool/test_dataset_tools.py
- tests/unit_tests/mcp_service/system/tool/test_get_schema.py
- tests/unit_tests/mcp_service/system/tool/test_mcp_core.py
-
Files skipped - 2
- superset/mcp_service/CLAUDE.md - Reason: Filter setting
- superset/mcp_service/docs/tool-search-optimization.md - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
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 documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
villebro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement! Minor nit, but other than that LGTM.
- Use modern Python type hints (list/dict) instead of typing.List/Dict - Replace broad Exception catch with specific exception types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Bito Automatic Review Skipped – PR Already Merged |
|
@dosubot what's the reason for the breaking change label? |
|
The breaking change label is applied because this PR removes the three legacy schema discovery tools ( To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
…6458) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
User description
SUMMARY
Consolidates three separate schema discovery tools (
get_chart_available_filters,get_dataset_available_filters,get_dashboard_available_filters) into a single unifiedget_schematool that returns comprehensive metadata for any model type.Token Usage Improvement
Tool Definition Overhead (loaded into LLM context each session):
Response Value (per API call):
Net Benefits:
select_columns,order_column, andsearchparametersChanges
Added:
get_schematool insuperset/mcp_service/system/tool/get_schema.pyModelGetSchemaCoreinmcp_core.pyfor reusable schema discovery logicschema_discovery.pywith column metadata definitions for all model typesRemoved:
get_chart_available_filters.py(deprecated)get_dataset_available_filters.py(deprecated)get_dashboard_available_filters.py(deprecated)Updated:
app.pyinstructions to reference newget_schematoolBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before (3 separate tools, limited info):
After (1 unified tool, comprehensive info):
TESTING INSTRUCTIONS
python -m superset.mcp_service.serverpytest tests/unit_tests/mcp_service/ -vADDITIONAL INFORMATION
CodeAnt-AI Description
Add unified get_schema tool and return minimal default columns for list APIs
What Changed
Impact
✅ ~47% fewer tool tokens per MCP session✅ Smaller default list responses✅ Fewer trial-and-error column requests💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.