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: [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]

Reply via email to