Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

create_connection

Configure and store connection settings for external data sources and services in Apache Airflow, enabling secure data pipeline integration.

Instructions

Create a connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conn_idYes
conn_typeYes
hostNo
portNo
loginNo
passwordNo
schemaNo
extraNo

Implementation Reference

  • The core handler function for the 'create_connection' tool. It constructs a connection request from input parameters and uses the Airflow ConnectionApi to create the connection, returning the response as text content.
    async def create_connection(
        conn_id: str,
        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 = {
            "connection_id": conn_id,
            "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.post_connection(connection_request=connection_request)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registers the create_connection tool (along with other connection tools) by including it in the list returned by get_all_functions(), with name 'create_connection', description 'Create a connection', and is_read_only=False.
    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),
        ]
  • src/main.py:95-96 (registration)
    The generic registration loop in main.py that adds all tools (including create_connection when CONNECTION API is enabled) to the MCP app using fastmcp Tool.from_function.
    for func, name, description, *_ in functions:
        app.add_tool(Tool.from_function(func, name=name, description=description))
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 fails completely. It doesn't indicate whether this is a read or write operation (though 'create' implies mutation), what permissions are required, whether it's idempotent, what happens on failure, or what the return value might be. For a tool with 8 parameters that presumably creates a persistent resource, this lack of behavioral information is critical.

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 two words, which could be appropriate if it were informative, but here it's under-specified rather than efficiently informative. While it's front-loaded (the entire description is in those two words), it fails to provide necessary context, making this conciseness detrimental rather than helpful.

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 complexity (8 parameters, 2 required), complete lack of annotations, 0% schema description coverage, and no output schema, the description is completely inadequate. A tool that presumably creates a persistent connection resource needs far more context about what it does, when to use it, what the parameters mean, and what behavior to expect.

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?

The schema has 0% description coverage for all 8 parameters, and the tool description provides zero information about what any parameter means. The description doesn't explain what 'conn_id' or 'conn_type' represent, what 'extra' might contain, or how these parameters relate to creating a connection. With 8 undocumented parameters, this is a severe deficiency.

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 'Create a connection' is a tautology that merely restates the tool name without providing any meaningful context about what a 'connection' is or what it does. It doesn't specify what type of connection (database, API, network) or what resource it creates, nor does it distinguish this from sibling tools like 'update_connection' or 'test_connection'.

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 about when to use this tool versus alternatives. There are multiple sibling tools related to connections (delete_connection, get_connection, list_connections, test_connection, update_connection), but the description offers no context about when this specific creation tool is appropriate versus those other options.

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