codeant-ai-for-open-source[bot] commented on PR #38414:
URL: https://github.com/apache/superset/pull/38414#issuecomment-4030145087
## **Sequence Diagram**
This PR adds a new MCP tool that validates a database, saves a SQL query as
a persistent SavedQuery in Superset, and returns an identifier and SQL Lab link
so clients can reload the query later.
```mermaid
sequenceDiagram
participant MCPClient
participant MCPService
participant SupersetBackend
participant SQLLab
MCPClient->>MCPService: Call save_sql_query(database_id, label, sql)
MCPService->>SupersetBackend: Validate database and user access
SupersetBackend-->>MCPService: Database and permissions OK
MCPService->>SupersetBackend: Create SavedQuery record
SupersetBackend-->>MCPService: SavedQuery with id
MCPService->>MCPService: Build SQL Lab link for savedQueryId
MCPService-->>MCPClient: Return saved query id and link
MCPClient->>SQLLab: Open link to load saved query
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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]