Skip to main content
Glama
aptro

Superset MCP Integration

by aptro

superset_database_test_connection

Test database connection details in Apache Superset to verify connectivity and configuration before deployment.

Instructions

Test a database connection

Makes a request to the /api/v1/database/test_connection endpoint to verify if the provided connection details can successfully connect to the database.

Args: database_data: Database connection details including sqlalchemy_uri and other parameters

Returns: A dictionary with connection test results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_dataYes

Implementation Reference

  • main.py:877-898 (handler)
    The handler function for the 'superset_database_test_connection' tool. It is decorated with @mcp.tool() for registration, @requires_auth to ensure authentication, and @handle_api_errors for error handling. The function tests a database connection by posting the database_data to Superset's /api/v1/database/test_connection API endpoint using the shared make_api_request helper.
    @mcp.tool()
    @requires_auth
    @handle_api_errors
    async def superset_database_test_connection(
        ctx: Context, database_data: Dict[str, Any]
    ) -> Dict[str, Any]:
        """
        Test a database connection
    
        Makes a request to the /api/v1/database/test_connection endpoint to verify if
        the provided connection details can successfully connect to the database.
    
        Args:
            database_data: Database connection details including sqlalchemy_uri and other parameters
    
        Returns:
            A dictionary with connection test results
        """
        return await make_api_request(
            ctx, "post", "/api/v1/database/test_connection", data=database_data
        )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'verifies if the provided connection details can successfully connect' which implies a read-only, non-destructive test operation. However, it doesn't disclose authentication requirements, rate limits, error handling, or what constitutes 'successful' connection (e.g., timeout thresholds, permission checks). The description is minimal beyond the basic action.

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 with three sentences: purpose statement, endpoint reference, and parameter/return overview. It's front-loaded with the core function. The 'Args:' and 'Returns:' sections add structure, though they could be integrated more smoothly. No wasted sentences, though slightly formulaic.

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

Completeness3/5

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

For a tool with 1 parameter (nested object), 0% schema coverage, no annotations, and no output schema, the description provides minimal but functional coverage. It explains what the tool does and the parameter's general content, but lacks details on connection detail structure, authentication needs, error cases, or return value specifics. It's adequate for basic understanding but incomplete for reliable use.

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?

Schema description coverage is 0%, so the schema provides no parameter documentation. The description adds that 'database_data' includes 'sqlalchemy_uri and other parameters', giving some semantic context beyond the bare schema. However, it doesn't detail what 'other parameters' might be, their formats, or required fields. With 1 parameter but poor schema coverage, this provides basic but incomplete compensation.

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: 'Test a database connection' and specifies it makes a request to a specific API endpoint. It distinguishes from siblings like 'superset_database_create' or 'superset_database_update' by focusing on testing rather than creating/modifying. However, it doesn't explicitly contrast with 'superset_database_validate_parameters' which might be a closer alternative.

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 doesn't mention prerequisites (e.g., needing valid connection details), when testing is appropriate (e.g., before creating a database), or differentiate from similar tools like 'superset_database_validate_parameters'. Usage is implied but not explicitly stated.

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