Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

test_connection

Test connectivity to external systems in Apache Airflow by validating connection parameters before deployment.

Instructions

Test a connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conn_typeYes
hostNo
portNo
loginNo
passwordNo
schemaNo
extraNo

Implementation Reference

  • The main handler function for the 'test_connection' tool. It constructs a connection request from parameters and calls the Airflow ConnectionApi.test_connection to perform the test, returning the response.
    async def test_connection(
        conn_type: str,
        host: Optional[str] = None,
        port: Optional[int] = None,
        login: Optional[str] = None,
        password: Optional[str] = None,
        schema: Optional[str] = None,
        extra: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        connection_request = {
            "conn_type": conn_type,
        }
        if host is not None:
            connection_request["host"] = host
        if port is not None:
            connection_request["port"] = port
        if login is not None:
            connection_request["login"] = login
        if password is not None:
            connection_request["password"] = password
        if schema is not None:
            connection_request["schema"] = schema
        if extra is not None:
            connection_request["extra"] = extra
    
        response = connection_api.test_connection(connection_request=connection_request)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registration of the 'test_connection' tool within the list of functions returned by get_all_functions(), which is used to register MCP tools.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]:
        """Return list of (function, name, description, is_read_only) tuples for registration."""
        return [
            (list_connections, "list_connections", "List all connections", True),
            (create_connection, "create_connection", "Create a connection", False),
            (get_connection, "get_connection", "Get a connection by ID", True),
            (update_connection, "update_connection", "Update a connection by ID", False),
            (delete_connection, "delete_connection", "Delete a connection by ID", False),
            (test_connection, "test_connection", "Test a connection", True),
        ]
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers none. It doesn't indicate whether this is a read-only diagnostic operation or has side effects, what authentication is required, whether it modifies system state, what happens on failure, or what the typical response format might be. For a tool with 7 parameters that presumably interacts with external systems, this lack of behavioral context is severely inadequate.

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

Conciseness3/5

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

The description is extremely concise at just three words, but this brevity comes at the cost of being under-specified rather than efficient. While it's front-loaded with the core action, every word earns its place only in the most minimal sense—it communicates the basic action but lacks the necessary detail for effective tool use. The structure is simple but incomplete.

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

Completeness1/5

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

Given the tool's apparent complexity (7 parameters for connection testing), complete lack of annotations, 0% schema description coverage, and no output schema, the description is completely inadequate. It doesn't explain what the tool does beyond the name, provides no behavioral context, offers no parameter guidance, and gives no indication of return values or error conditions. This leaves an agent with insufficient information to use the tool effectively.

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

Parameters1/5

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

With 0% schema description coverage and 7 parameters (only one required), the description provides zero information about parameter meanings. It doesn't explain what 'conn_type' represents, what the various connection parameters (host, port, login, password, schema, extra) are for, or how they relate to testing connections. The description fails completely to compensate for the schema's lack of documentation.

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

Purpose2/5

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

The description 'Test a connection' is a tautology that restates the tool name 'test_connection' without adding meaningful specificity. It doesn't clarify what type of connection is being tested (database, network, API, etc.), what 'testing' entails (connectivity verification, authentication, performance check), or what resource is involved. While it includes a verb ('Test') and resource ('connection'), it lacks the specificity needed to distinguish it from potential alternatives.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or relationships to sibling tools like 'create_connection', 'get_connection', 'update_connection', or 'delete_connection'. An agent would have no indication whether this should be used before creating a connection, after modifying one, or as a standalone diagnostic tool.

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/yangkyeongmo/mcp-server-apache-airflow'

If you have feedback or need assistance with the MCP directory API, please join our Discord server