Skip to main content
Glama
aptro

Superset MCP Integration

by aptro

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
NameRequiredDescriptionDefault
database_idYes

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"
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool makes an API request and returns a dictionary, but it doesn't cover critical aspects like authentication requirements, rate limits, error handling, or whether the operation is read-only or has side effects. For a tool with no annotations, this leaves significant gaps in understanding its behavior and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise and well-structured. It starts with a clear purpose statement, followed by implementation details and parameter/return explanations in a bullet-like format. Each sentence adds value without redundancy, making it easy to parse. However, the inclusion of the API endpoint path ('/api/v1/database/{id}/connection') might be slightly verbose for an agent-focused description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for effective tool use. It mentions returning 'a dictionary with detailed connection information' but doesn't specify what that includes (e.g., keys, data types). For a tool with no structured output and minimal behavioral context, more details on response structure, error cases, or usage examples would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantics beyond the input schema. It explains that 'database_id' is the 'ID of the database,' which aligns with the schema's title 'Database Id' and type 'integer.' With 0% schema description coverage, the description partially compensates by clarifying the parameter's purpose, but it doesn't provide additional details like format examples or constraints, leaving room for improvement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get database connection information' and 'retrieve connection details for a specific database.' It specifies the verb ('get', 'retrieve') and resource ('database connection information'), making the action clear. However, it doesn't explicitly distinguish this tool from siblings like 'superset_database_get_by_id' or 'superset_database_test_connection', which might have overlapping purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions retrieving connection details but doesn't specify use cases, prerequisites, or comparisons to sibling tools such as 'superset_database_get_by_id' (which might return general database info) or 'superset_database_test_connection' (which might test connectivity). Without such context, an agent lacks direction on appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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