Skip to main content
Glama
aptro

Superset MCP Integration

by aptro

superset_saved_query_create

Save SQL queries for reuse by storing them in Apache Superset with database connection, schema, and descriptive labels.

Instructions

Create a new saved query

Makes a request to the /api/v1/saved_query/ POST endpoint to save a SQL query for later reuse.

Args: query_data: Dictionary containing the query information including: - db_id: Database ID - schema: Schema name (optional) - sql: SQL query text - label: Display name for the saved query - description: Optional description of the query

Returns: A dictionary with the created saved query information including its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
query_dataYes

Implementation Reference

  • The handler function for the 'superset_saved_query_create' tool. It creates a new saved query in Superset by sending a POST request to the /api/v1/saved_query/ endpoint with the provided query_data dictionary containing db_id, schema, sql, label, and description.
    @mcp.tool() @requires_auth @handle_api_errors async def superset_saved_query_create( ctx: Context, query_data: Dict[str, Any] ) -> Dict[str, Any]: """ Create a new saved query Makes a request to the /api/v1/saved_query/ POST endpoint to save a SQL query for later reuse. Args: query_data: Dictionary containing the query information including: - db_id: Database ID - schema: Schema name (optional) - sql: SQL query text - label: Display name for the saved query - description: Optional description of the query Returns: A dictionary with the created saved query information including its ID """ return await make_api_request(ctx, "post", "/api/v1/saved_query/", data=query_data)

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aptro/superset-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server