superset_database_get_connection
Retrieve connection details for a specific database in Apache Superset by providing its ID. This tool fetches configuration and access information from the Superset API.
Instructions
Get database connection information
Makes a request to the /api/v1/database/{id}/connection endpoint to retrieve connection details for a specific database.
Args: database_id: ID of the database
Returns: A dictionary with detailed connection information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes |
Implementation Reference
- main.py:972-992 (handler)The main handler function for the 'superset_database_get_connection' tool. It is decorated with @mcp.tool() for registration, @requires_auth for authentication check, and @handle_api_errors for error handling. The function makes a GET request to Superset API endpoint '/api/v1/database/{database_id}/connection' using the 'make_api_request' helper to retrieve database connection details.@requires_auth @handle_api_errors async def superset_database_get_connection( ctx: Context, database_id: int ) -> Dict[str, Any]: """ Get database connection information Makes a request to the /api/v1/database/{id}/connection endpoint to retrieve connection details for a specific database. Args: database_id: ID of the database Returns: A dictionary with detailed connection information """ return await make_api_request( ctx, "get", f"/api/v1/database/{database_id}/connection" )