Skip to main content
Glama
aptro

Superset MCP Integration

by aptro

superset_dataset_create

Create datasets in Apache Superset by connecting database tables or views to enable data visualization and analysis.

Instructions

Create a new dataset in Superset

Makes a request to the /api/v1/dataset/ POST endpoint to create a new dataset from an existing database table or view.

Args: table_name: Name of the physical table in the database database_id: ID of the database where the table exists schema: Optional database schema name where the table is located owners: Optional list of user IDs who should own this dataset

Returns: A dictionary with the created dataset information including its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
database_idYes
schemaNo
ownersNo

Implementation Reference

  • The main handler function for the 'superset_dataset_create' MCP tool. It constructs a payload with table_name, database_id, optional schema and owners, and makes a POST request to Superset's /api/v1/dataset/ endpoint to create the dataset.
    @mcp.tool() @requires_auth @handle_api_errors async def superset_dataset_create( ctx: Context, table_name: str, database_id: int, schema: str = None, owners: List[int] = None, ) -> Dict[str, Any]: """ Create a new dataset in Superset Makes a request to the /api/v1/dataset/ POST endpoint to create a new dataset from an existing database table or view. Args: table_name: Name of the physical table in the database database_id: ID of the database where the table exists schema: Optional database schema name where the table is located owners: Optional list of user IDs who should own this dataset Returns: A dictionary with the created dataset information including its ID """ payload = { "table_name": table_name, "database": database_id, } if schema: payload["schema"] = schema if owners: payload["owners"] = owners return await make_api_request(ctx, "post", "/api/v1/dataset/", data=payload)

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