You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "onurtashan (via GitHub)" <gi...@apache.org> on 2026/06/18 09:05:34 UTC
[PR] fix(mcp): include embedded_uuid in get_dashboard_info response [superset]
onurtashan opened a new pull request, #41195:
URL: https://github.com/apache/superset/pull/41195
### Summary
`get_dashboard_info` returns the internal dashboard `uuid` but not the **embedded UUID** — a separate field required for guest token generation in embedded dashboard workflows.
**The problem:** When using the Superset MCP to build embedded dashboards, agents need the embedded UUID to generate guest tokens. The guest token payload requires `resources[].id` to be the **embedded UUID** (from `GET /api/v1/dashboard/{id}/embedded`), not the dashboard UUID. Using the wrong one causes 403 errors in `has_guest_access()`.
**Before this fix:** agents had to leave the MCP and call the REST API directly to get the embedded UUID, or navigate to the Superset UI (Edit Dashboard → Embed).
**After this fix:** `get_dashboard_info` returns `embedded_uuid` alongside `uuid`. `null` when the dashboard has not been configured for embedding.
### Changes
- **`superset/mcp_service/dashboard/schemas.py`**: adds `embedded_uuid: str | None` to `DashboardInfo` with a description clarifying the difference from `uuid` and when to use it
- **`superset/mcp_service/dashboard/tool/get_dashboard_info.py`**: adds `subqueryload(Dashboard.embedded)` to eager options to avoid an N+1 query
- **`tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py`**: two new tests (embedded UUID present / absent) + `dashboard.embedded = []` added to all existing mock dashboards
### Test plan
- [ ] `test_get_dashboard_info_includes_embedded_uuid` — verifies `embedded_uuid` is returned when the dashboard has been configured for embedding
- [ ] `test_get_dashboard_info_embedded_uuid_none_when_not_embedded` — verifies `embedded_uuid` is `None` for dashboards not configured for embedding
- [ ] Existing `get_dashboard_info` tests pass unchanged
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
--
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] fix(mcp): include embedded_uuid in get_dashboard_info response [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 #41195:
URL: https://github.com/apache/superset/pull/41195#discussion_r3440842724
##########
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py:
##########
@@ -1012,6 +1021,88 @@ async def test_list_dashboards_omits_requested_user_directory_fields(
assert field not in data["columns_available"]
+@patch("superset.mcp_service.mcp_core.ModelGetInfoCore._find_object")
+@pytest.mark.asyncio
+async def test_get_dashboard_info_includes_embedded_uuid(mock_find_object, mcp_server):
Review Comment:
**Suggestion:** Add explicit type annotations for all parameters and the return type in this new async test function to comply with the project typing rule for newly introduced code. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This is a newly added Python async function in a modified file, and its parameters are untyped with no return annotation. That directly violates the rule requiring new Python code to be fully typed.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e3a47a7e320b4f8d8b495559647d4b3a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e3a47a7e320b4f8d8b495559647d4b3a&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:** tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
**Line:** 1026:1026
**Comment:**
*Custom Rule: Add explicit type annotations for all parameters and the return type in this new async test function to comply with the project typing rule for newly introduced code.
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%2F41195&comment_hash=01766622d52977e1878034578a9fa1baddee528d4c652e289d180f4546c6dab6&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41195&comment_hash=01766622d52977e1878034578a9fa1baddee528d4c652e289d180f4546c6dab6&reaction=dislike'>👎</a>
##########
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py:
##########
@@ -1012,6 +1021,88 @@ async def test_list_dashboards_omits_requested_user_directory_fields(
assert field not in data["columns_available"]
+@patch("superset.mcp_service.mcp_core.ModelGetInfoCore._find_object")
+@pytest.mark.asyncio
+async def test_get_dashboard_info_includes_embedded_uuid(mock_find_object, mcp_server):
+ """Test that get_dashboard_info returns embedded_uuid when set."""
+ from superset.models.embedded_dashboard import EmbeddedDashboard
+
+ dashboard = Mock()
+ dashboard.id = 1
+ dashboard.dashboard_title = "Embedded Dashboard"
+ dashboard.slug = ""
+ dashboard.description = None
+ dashboard.css = None
+ dashboard.certified_by = None
+ dashboard.certification_details = None
+ dashboard.json_metadata = "{}"
+ dashboard.published = True
+ dashboard.is_managed_externally = False
+ dashboard.external_url = None
+ dashboard.created_on = None
+ dashboard.changed_on = None
+ dashboard.created_on_humanized = None
+ dashboard.changed_on_humanized = None
+ dashboard.uuid = "94b826a5-dbd5-473d-ab58-1af676ee07e4"
+ dashboard.url = "/dashboard/1"
+ dashboard.slices = []
+ dashboard.owners = []
+ dashboard.tags = []
+ dashboard.roles = []
+ dashboard.embedded = []
+
+ embedded = Mock(spec=EmbeddedDashboard)
+ embedded.uuid = "37c56048-d3f1-452d-b3ae-0879802dcb1f"
+ dashboard.embedded = [embedded]
+
+ mock_find_object.return_value = dashboard
+ async with Client(mcp_server) as client:
+ result = await client.call_tool(
+ "get_dashboard_info", {"request": {"identifier": 1}}
+ )
+ assert result.data["uuid"] == "94b826a5-dbd5-473d-ab58-1af676ee07e4"
+ assert result.data["embedded_uuid"] == "37c56048-d3f1-452d-b3ae-0879802dcb1f"
+
+
+@patch("superset.mcp_service.mcp_core.ModelGetInfoCore._find_object")
+@pytest.mark.asyncio
+async def test_get_dashboard_info_embedded_uuid_none_when_not_embedded(
+ mock_find_object, mcp_server
+):
Review Comment:
**Suggestion:** Add parameter and return type annotations to this newly added async test function signature so the new code is fully typed. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This newly added async test function lacks parameter type hints and a return type annotation. Because it is introduced in the changed code, it matches the typing rule violation exactly.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=2853179154ae4e5b972625d1a28e0513&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=2853179154ae4e5b972625d1a28e0513&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:** tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
**Line:** 1069:1071
**Comment:**
*Custom Rule: Add parameter and return type annotations to this newly added async test function signature so the new code is fully typed.
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%2F41195&comment_hash=b15565ff784e31ef5103121c525f682bec27f25e4f0affaa8fefcb07997432e0&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41195&comment_hash=b15565ff784e31ef5103121c525f682bec27f25e4f0affaa8fefcb07997432e0&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] fix(mcp): include embedded_uuid in get_dashboard_info response [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41195:
URL: https://github.com/apache/superset/pull/41195#issuecomment-4740109437
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41195?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 `33.33333%` with `4 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 54.68%. Comparing base ([`2392c8e`](https://app.codecov.io/gh/apache/superset/commit/2392c8e624a99cebee4999d003ad0a5283715143?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d75cbb3`](https://app.codecov.io/gh/apache/superset/commit/d75cbb38d75445447538dcbad1c9ea3e7e906776?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 775 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/41195?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/dashboard/schemas.py](https://app.codecov.io/gh/apache/superset/pull/41195?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fdashboard%2Fschemas.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvZGFzaGJvYXJkL3NjaGVtYXMucHk=) | 40.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/41195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...t/mcp\_service/dashboard/tool/get\_dashboard\_info.py](https://app.codecov.io/gh/apache/superset/pull/41195?src=pr&el=tree&filepath=superset%2Fmcp_service%2Fdashboard%2Ftool%2Fget_dashboard_info.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvbWNwX3NlcnZpY2UvZGFzaGJvYXJkL3Rvb2wvZ2V0X2Rhc2hib2FyZF9pbmZvLnB5) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/41195?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 (2392c8e) and HEAD (d75cbb3). Click for more details.
>
> <details><summary>HEAD has 75 uploads less than BASE</summary>
>
>| Flag | BASE (2392c8e) | HEAD (d75cbb3) |
>|------|------|------|
>|python|70|1|
>|presto|7|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41195 +/- ##
==========================================
- Coverage 64.08% 54.68% -9.41%
==========================================
Files 2590 2643 +53
Lines 137966 143345 +5379
Branches 31998 32848 +850
==========================================
- Hits 88410 78382 -10028
- Misses 48038 64230 +16192
+ Partials 1518 733 -785
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41195/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/41195/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/41195/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/41195/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/41195/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.91% <33.33%> (-0.14%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/41195/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.91% <33.33%> (-19.61%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/41195/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/41195/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 Harness](https://app.codecov.io/gh/apache/superset/pull/41195?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] fix(mcp): include embedded_uuid in get_dashboard_info response [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41195:
URL: https://github.com/apache/superset/pull/41195#issuecomment-4740082181
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | d75cbb38d75445447538dcbad1c9ea3e7e906776 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a33b4df18edab00087557c7 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41195--superset-docs-preview.netlify.app](https://deploy-preview-41195--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><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#DctBDoIwEAXQu8zaiTWIJd7AY8z0T6WJpU2FBGO4O929zftTbSXXlZ5EF9ImS5i7Y9qvOVR-28qQ76xFGjgtsbBlNcDA25bQD6x-yu-Fvh4yDHpHvE0GUefc5MfRB0_HCQ) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-41195--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] fix(mcp): include embedded_uuid in get_dashboard_info response [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41195:
URL: https://github.com/apache/superset/pull/41195#issuecomment-4740059724
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] fix(mcp): include embedded_uuid in get_dashboard_info response [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41195:
URL: https://github.com/apache/superset/pull/41195#issuecomment-4743093185
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] fix(mcp): include embedded_uuid in get_dashboard_info response [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #41195:
URL: https://github.com/apache/superset/pull/41195
--
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] fix(mcp): include embedded_uuid in get_dashboard_info response [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 #41195:
URL: https://github.com/apache/superset/pull/41195#discussion_r3453271217
##########
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py:
##########
@@ -1012,6 +1021,88 @@ async def test_list_dashboards_omits_requested_user_directory_fields(
assert field not in data["columns_available"]
+@patch("superset.mcp_service.mcp_core.ModelGetInfoCore._find_object")
+@pytest.mark.asyncio
+async def test_get_dashboard_info_includes_embedded_uuid(mock_find_object, mcp_server):
+ """Test that get_dashboard_info returns embedded_uuid when set."""
+ from superset.models.embedded_dashboard import EmbeddedDashboard
+
+ dashboard = Mock()
+ dashboard.id = 1
+ dashboard.dashboard_title = "Embedded Dashboard"
+ dashboard.slug = ""
+ dashboard.description = None
+ dashboard.css = None
+ dashboard.certified_by = None
+ dashboard.certification_details = None
+ dashboard.json_metadata = "{}"
+ dashboard.published = True
+ dashboard.is_managed_externally = False
+ dashboard.external_url = None
+ dashboard.created_on = None
+ dashboard.changed_on = None
+ dashboard.created_on_humanized = None
+ dashboard.changed_on_humanized = None
+ dashboard.uuid = "94b826a5-dbd5-473d-ab58-1af676ee07e4"
+ dashboard.url = "/dashboard/1"
+ dashboard.slices = []
+ dashboard.owners = []
+ dashboard.tags = []
+ dashboard.roles = []
+ dashboard.embedded = []
+
+ embedded = Mock(spec=EmbeddedDashboard)
+ embedded.uuid = "37c56048-d3f1-452d-b3ae-0879802dcb1f"
+ dashboard.embedded = [embedded]
+
+ mock_find_object.return_value = dashboard
+ async with Client(mcp_server) as client:
+ result = await client.call_tool(
+ "get_dashboard_info", {"request": {"identifier": 1}}
+ )
+ assert result.data["uuid"] == "94b826a5-dbd5-473d-ab58-1af676ee07e4"
+ assert result.data["embedded_uuid"] == "37c56048-d3f1-452d-b3ae-0879802dcb1f"
+
+
+@patch("superset.mcp_service.mcp_core.ModelGetInfoCore._find_object")
+@pytest.mark.asyncio
+async def test_get_dashboard_info_embedded_uuid_none_when_not_embedded(
+ mock_find_object, mcp_server
+):
Review Comment:
**Suggestion:** Add explicit type hints for both fixture parameters and the return type on this newly added async test function so the new code is fully typed. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This newly added async test function also omits type hints for both parameters and the return value. Since the surrounding code is being changed and new Python code should be fully typed, this is a genuine violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=bf5874cd71b64acca4442453af3cb9a0&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=bf5874cd71b64acca4442453af3cb9a0&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:** tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
**Line:** 1067:1071
**Comment:**
*Custom Rule: Add explicit type hints for both fixture parameters and the return type on this newly added async test function so the new code is fully typed.
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%2F41195&comment_hash=5fdd430742243624a4a9b34c653674fe08d6f92f4e75dea974fde3c42f6cb828&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41195&comment_hash=5fdd430742243624a4a9b34c653674fe08d6f92f4e75dea974fde3c42f6cb828&reaction=dislike'>👎</a>
##########
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py:
##########
@@ -1012,6 +1021,88 @@ async def test_list_dashboards_omits_requested_user_directory_fields(
assert field not in data["columns_available"]
+@patch("superset.mcp_service.mcp_core.ModelGetInfoCore._find_object")
+@pytest.mark.asyncio
+async def test_get_dashboard_info_includes_embedded_uuid(mock_find_object, mcp_server):
Review Comment:
**Suggestion:** Add explicit type hints for all parameters and the return type on this newly added async test function to comply with the fully typed new code requirement. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This is a newly added Python async test function, and it has no parameter annotations or return type annotation. The custom rule requires new Python code to be fully typed, so the omission is a real violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=26c5d04a5cb647eeaf1b280f958c8a72&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=26c5d04a5cb647eeaf1b280f958c8a72&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:** tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_tools.py
**Line:** 1024:1026
**Comment:**
*Custom Rule: Add explicit type hints for all parameters and the return type on this newly added async test function to comply with the fully typed new code requirement.
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%2F41195&comment_hash=c0f902ec460b174af6b1148bda566ff8fb556ff12563085128fbef70b6fcdb5e&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41195&comment_hash=c0f902ec460b174af6b1148bda566ff8fb556ff12563085128fbef70b6fcdb5e&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