superset_database_get_tables
Retrieve all tables from a Superset database by ID to view schema and table details for data exploration and management.
Instructions
Get a list of tables for a given database
Makes a request to the /api/v1/database/{id}/tables/ endpoint to retrieve all tables available in the database.
Args: database_id: ID of the database
Returns: A dictionary with list of tables including schema and table name information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes |
Implementation Reference
- main.py:835-854 (handler)The handler function implementing the 'superset_database_get_tables' tool. It requires authentication and error handling decorators. The function takes a database_id and makes a GET request to the Superset API to fetch the list of tables.@mcp.tool() @requires_auth @handle_api_errors async def superset_database_get_tables( ctx: Context, database_id: int ) -> Dict[str, Any]: """ Get a list of tables for a given database Makes a request to the /api/v1/database/{id}/tables/ endpoint to retrieve all tables available in the database. Args: database_id: ID of the database Returns: A dictionary with list of tables including schema and table name information """ return await make_api_request(ctx, "get", f"/api/v1/database/{database_id}/tables/")