Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

create_connection

Configure and establish connections in Apache Airflow by specifying connection parameters like host, port, and credentials for data pipeline integrations.

Instructions

Create a connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conn_idYes
conn_typeYes
hostNo
portNo
loginNo
passwordNo
schemaNo
extraNo

Implementation Reference

  • The async handler function that implements the create_connection tool by building a connection request and calling the Airflow ConnectionApi to create the connection.
    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(), which is used by main.py to add tools to the MCP server.
    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:90-92 (registration)
    The loop in main() that registers all tools from connection functions (including create_connection) by calling app.add_tool().
    for func, name, description, *_ in functions:
        app.add_tool(func, name=name, description=description)
Behavior1/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. The description only states 'Create a connection' without explaining what happens when a connection is created - whether it's persistent, what permissions are required, whether it's immediately active, what validation occurs, or what happens if a connection with the same ID already exists. For a mutation tool with 8 parameters and no annotation coverage, this is a critical gap in behavioral information.

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

Conciseness5/5

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

The description is extremely concise at just two words. While this represents under-specification rather than ideal conciseness, from a pure structural perspective, it contains zero wasted words and is front-loaded with the core action. Every word in 'Create a connection' directly contributes to stating the tool's purpose, even if inadequately.

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?

The description is completely inadequate for a tool with 8 parameters, no annotations, and no output schema. It doesn't explain what a 'connection' is in this context, what system it belongs to, what the creation entails, what parameters are needed, or what the tool returns. Given the complexity implied by the parameter count and the complete lack of structured documentation, the description fails to provide even basic contextual understanding.

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 8 parameters and 0% schema description coverage, the description provides no information about any parameters. It doesn't explain what 'conn_id' or 'conn_type' represent (the two required parameters), what valid connection types are, or what the purpose of the other 6 optional parameters is. The description fails to compensate for the complete lack of schema documentation, leaving all parameters semantically undefined.

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 restates the tool name without adding meaningful context. It doesn't specify what type of connection is being created (database, API, network, etc.), what system it's for, or what resources it affects. While it includes a verb ('Create') and resource ('connection'), it lacks specificity and doesn't distinguish this tool 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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when this tool should be used instead of 'update_connection' or 'test_connection', or any context about what constitutes a valid connection. With multiple sibling tools related to connections (create_connection, delete_connection, get_connection, list_connections, test_connection, update_connection), the absence of usage guidance is particularly problematic.

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/nikhil-ganage/mcp-server-airflow-token'

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