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/05/20 22:50:25 UTC
[PR] feat(mcp): add list and get tools for row level security and plugins [superset]
aminghadersohi opened a new pull request, #40306:
URL: https://github.com/apache/superset/pull/40306
### SUMMARY
Adds 4 new MCP tools across two new domains as part of story #99978 (Add list and info MCP tools for all accessible menu features):
**Row Level Security (`superset/mcp_service/rls/`)**
- `list_rls_filters` — List RLS filters with filtering (by `name`, `filter_type`), search, pagination, and column selection. Admin access required.
- `get_rls_filter_info` — Get full RLS filter details by ID, including tables, roles, and WHERE clause. Admin access required.
**Dynamic Plugins (`superset/mcp_service/plugin/`)**
- `list_plugins` — List dynamic plugins with filtering (by `name`, `key`), search, pagination, and column selection. Admin access required.
- `get_plugin_info` — Get full plugin details by ID, including key and bundle URL. Admin access required.
Both domains follow the established pattern: `ModelListCore` / `ModelGetInfoCore`, Pydantic schemas with column filtering via serialization context, `@tool` decorator with RBAC via `class_permission_name`, and `event_logger` instrumentation.
A minimal `DynamicPluginDAO` is co-located in `superset/mcp_service/plugin/dao.py` since no top-level DAO exists for `DynamicPlugin`.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — backend-only MCP tool additions.
### TESTING INSTRUCTIONS
Run the new unit tests:
```bash
pytest tests/unit_tests/mcp_service/rls/tool/test_rls_tools.py -v
pytest tests/unit_tests/mcp_service/plugin/tool/test_plugin_tools.py -v
```
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [x] 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] feat(mcp): add list and get tools for row level security and plugins [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi closed pull request #40306: feat(mcp): add list and get tools for row level security and plugins
URL: https://github.com/apache/superset/pull/40306
--
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] feat(mcp): add list and get tools for row level security and plugins [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40306:
URL: https://github.com/apache/superset/pull/40306#issuecomment-4517965517
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] feat(mcp): add list and get tools for row level security and plugins [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #40306:
URL: https://github.com/apache/superset/pull/40306#issuecomment-4514741734
Closing in favor of a correctly-named branch (amin/mcp-rls-plugins).
--
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] feat(mcp): add list and get tools for row level security and plugins [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #40306:
URL: https://github.com/apache/superset/pull/40306#discussion_r3287954029
##########
superset/mcp_service/rls/schemas.py:
##########
@@ -0,0 +1,255 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""
+Pydantic schemas for row level security filter responses.
+"""
+
+from __future__ import annotations
+
+from datetime import datetime
+from typing import Annotated, Any, Dict, List, Literal
+
+from pydantic import (
+ BaseModel,
+ ConfigDict,
+ Field,
+ field_validator,
+ model_serializer,
+ model_validator,
+ PositiveInt,
+)
+
+from superset.daos.base import ColumnOperator, ColumnOperatorEnum
+from superset.mcp_service.constants import DEFAULT_PAGE_SIZE, MAX_PAGE_SIZE
+from superset.mcp_service.system.schemas import PaginationInfo
+from superset.mcp_service.utils.schema_utils import (
+ parse_json_or_list,
+ parse_json_or_model_list,
+)
+
+DEFAULT_RLS_COLUMNS = ["id", "name", "filter_type", "clause"]
+
+ALL_RLS_COLUMNS = [
+ "id",
+ "name",
+ "filter_type",
+ "tables",
+ "roles",
+ "clause",
+ "group_key",
+ "changed_on",
+]
+
+SORTABLE_RLS_COLUMNS = ["id", "name", "filter_type", "changed_on"]
+
+
+class RlsColumnFilter(ColumnOperator):
+ """Filter object for RLS filter listing."""
+
+ col: Literal["name", "filter_type"] = Field(
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing pyright ignore comment</b></div>
<div id="fix">
The `col` field overrides `ColumnOperator.col` with a `Literal` type but lacks the pyright ignore comment present in all other filter classes (`DashboardFilter`, `DatasetFilter`, `DatabaseFilter`, `ChartFilter`). This causes pyright type-checking warnings.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
--- superset/mcp_service/rls/schemas.py
+++ superset/mcp_service/rls/schemas.py
@@ -64,6 +64,6 @@
"""
- col: Literal["name", "filter_type"] = Field(
+ col: Literal["name", "filter_type"] = Field( # pyright: ignore[reportIncompatibleVariableOverride]
...,
description="Column to filter on.",
)
```
</div>
</details>
</div>
<small><i>Code Review Run #213174</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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] feat(mcp): add list and get tools for row level security and plugins [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #40306:
URL: https://github.com/apache/superset/pull/40306#issuecomment-4503316094
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40306?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `66.21622%` with `100 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 55.39%. Comparing base ([`68c145a`](https://app.codecov.io/gh/apache/superset/commit/68c145adc3610283a2c695c0a2f0b5cb10ee0118?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`808246a`](https://app.codecov.io/gh/apache/superset/commit/808246afe060dcda53f14dbfdd9252fb5be44cc1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/40306?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [superset/mcp\_service/plugin/tool/list\_plugins.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fplugin%2Ftool%2Flist_plugins.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcGx1Z2luL3Rvb2wvbGlzdF9wbHVnaW5zLnB5) | 35.71% | [18 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [superset/mcp\_service/rls/schemas.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Frls%2Fschemas.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcmxzL3NjaGVtYXMucHk=) | 81.44% | [17 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [superset/mcp\_service/rls/tool/list\_rls\_filters.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Frls%2Ftool%2Flist_rls_filters.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcmxzL3Rvb2wvbGlzdF9ybHNfZmlsdGVycy5weQ==) | 35.71% | [18 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [superset/mcp\_service/plugin/schemas.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fplugin%2Fschemas.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcGx1Z2luL3NjaGVtYXMucHk=) | 81.17% | [15 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...uperset/mcp\_service/plugin/tool/get\_plugin\_info.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fplugin%2Ftool%2Fget_plugin_info.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcGx1Z2luL3Rvb2wvZ2V0X3BsdWdpbl9pbmZvLnB5) | 43.47% | [13 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...perset/mcp\_service/rls/tool/get\_rls\_filter\_info.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Frls%2Ftool%2Fget_rls_filter_info.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcmxzL3Rvb2wvZ2V0X3Jsc19maWx0ZXJfaW5mby5weQ==) | 43.47% | [13 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [superset/mcp\_service/plugin/dao.py](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fplugin%2Fdao.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvcGx1Z2luL2Rhby5weQ==) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/40306?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (68c145a) and HEAD (808246a). Click for more details.
>
> <details><summary>HEAD has 9 uploads less than BASE</summary>
>
>| Flag | BASE (68c145a) | HEAD (808246a) |
>|------|------|------|
>|python|10|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #40306 +/- ##
==========================================
- Coverage 64.18% 55.39% -8.80%
==========================================
Files 2591 2600 +9
Lines 138455 138751 +296
Branches 32118 32130 +12
==========================================
- Hits 88871 76856 -12015
- Misses 48052 61228 +13176
+ Partials 1532 667 -865
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/40306/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/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.21% <66.21%> (+0.11%)` | :arrow_up: |
| [python](https://app.codecov.io/gh/apache/superset/pull/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.21% <66.21%> (-19.36%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/40306/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
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 Sentry](https://app.codecov.io/gh/apache/superset/pull/40306?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] feat(mcp): add list and get tools for row level security and plugins [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40306:
URL: https://github.com/apache/superset/pull/40306#issuecomment-4503284064
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