superset_database_get_catalogs
Retrieve all available catalogs from a specified database in Apache Superset to organize and access data structures for analysis.
Instructions
Get all catalogs from a database
Makes a request to the /api/v1/database/{id}/catalogs/ endpoint to retrieve all catalogs available in the database.
Args: database_id: ID of the database
Returns: A dictionary with list of catalog names for databases that support catalogs
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database_id": "<database_id>"
},
"name": "superset_database_get_catalogs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes |
Implementation Reference
- main.py:948-969 (handler)The handler function decorated with @mcp.tool() that implements the superset_database_get_catalogs tool. It retrieves catalogs from a Superset database by calling the API endpoint /api/v1/database/{database_id}/catalogs/ using the make_api_request helper.
@mcp.tool() @requires_auth @handle_api_errors async def superset_database_get_catalogs( ctx: Context, database_id: int ) -> Dict[str, Any]: """ Get all catalogs from a database Makes a request to the /api/v1/database/{id}/catalogs/ endpoint to retrieve all catalogs available in the database. Args: database_id: ID of the database Returns: A dictionary with list of catalog names for databases that support catalogs """ return await make_api_request( ctx, "get", f"/api/v1/database/{database_id}/catalogs/" )