superset_database_get_related_objects
Retrieve charts and dashboards linked to a specific database in Apache Superset to identify dependencies and assess impact before making changes.
Instructions
Get charts and dashboards associated with a database
Makes a request to the /api/v1/database/{id}/related_objects/ endpoint to retrieve counts and references of charts and dashboards that depend on this database.
Args: database_id: ID of the database
Returns: A dictionary with counts and lists of related charts and dashboards
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes |
Implementation Reference
- main.py:1017-1036 (handler)Handler function implementing the 'superset_database_get_related_objects' MCP tool. It requires authentication and error handling, and proxies a GET request to Superset's /api/v1/database/{database_id}/related_objects/ endpoint to fetch associated charts and dashboards.@mcp.tool() @requires_auth @handle_api_errors async def superset_database_get_related_objects( ctx: Context, database_id: int ) -> Dict[str, Any]: """ Get charts and dashboards associated with a database Makes a request to the /api/v1/database/{id}/related_objects/ endpoint to retrieve counts and references of charts and dashboards that depend on this database. Args: database_id: ID of the database Returns: A dictionary with counts and lists of related charts and dashboards """ return await make_api_request( ctx, "get", f"/api/v1/database/{database_id}/related_objects/"