Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

list_connections

Retrieve and display all configured connections from Apache Airflow, enabling users to view connection details, manage access, and monitor integration points within their data workflows.

Instructions

List all connections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
order_byNo

Implementation Reference

  • The handler function implementing the list_connections tool. It constructs query parameters from inputs and fetches connections from Airflow's ConnectionApi, returning the result as text content.
    async def list_connections(
        limit: Optional[int] = None,
        offset: Optional[int] = None,
        order_by: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        # Build parameters dictionary
        kwargs: Dict[str, Any] = {}
        if limit is not None:
            kwargs["limit"] = limit
        if offset is not None:
            kwargs["offset"] = offset
        if order_by is not None:
            kwargs["order_by"] = order_by
    
        response = connection_api.get_connections(**kwargs)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registration of the list_connections tool via get_all_functions(), which provides the function reference, name, description, and read-only status for MCP tool registration.
    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:24-40 (registration)
    Mapping in APITYPE_TO_FUNCTIONS dictionary that associates APIType.CONNECTION with get_connection_functions from connection.py, enabling registration of connection tools including list_connections.
    APITYPE_TO_FUNCTIONS = {
        APIType.CONFIG: get_config_functions,
        APIType.CONNECTION: get_connection_functions,
        APIType.DAG: get_dag_functions,
        APIType.DAGRUN: get_dagrun_functions,
        APIType.DAGSTATS: get_dagstats_functions,
        APIType.DATASET: get_dataset_functions,
        APIType.EVENTLOG: get_eventlog_functions,
        APIType.IMPORTERROR: get_importerror_functions,
        APIType.MONITORING: get_monitoring_functions,
        APIType.PLUGIN: get_plugin_functions,
        APIType.POOL: get_pool_functions,
        APIType.PROVIDER: get_provider_functions,
        APIType.TASKINSTANCE: get_taskinstance_functions,
        APIType.VARIABLE: get_variable_functions,
        APIType.XCOM: get_xcom_functions,
    }
  • src/main.py:95-96 (registration)
    The loop in main() function that iterates over functions from get_all_functions() and registers each as an MCP tool using app.add_tool.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all connections' implies a read-only operation, but it doesn't specify whether this requires authentication, what the output format is (e.g., paginated list), or any rate limits. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 three words, with no wasted text. It's front-loaded with the core action ('List all connections'), making it easy to parse quickly. This efficiency is appropriate for a simple-sounding tool, though it may sacrifice clarity.

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 complexity (3 parameters with no schema descriptions, no annotations, and no output schema), the description is incomplete. It doesn't explain the tool's behavior, parameter usage, or output, leaving the agent with insufficient context to use it effectively. For a list tool with undocumented parameters, more detail is needed.

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 input schema has 3 parameters (limit, offset, order_by) with 0% schema description coverage, meaning none are documented in the schema. The description 'List all connections' adds no information about these parameters—it doesn't explain what 'limit' controls, how 'offset' works for pagination, or what 'order_by' values are acceptable. This fails to compensate for the low schema coverage.

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

Purpose3/5

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

The description 'List all connections' clearly states the verb ('List') and resource ('connections'), which is better than a tautology. However, it lacks specificity about what 'connections' are in this context (e.g., Airflow connections) and doesn't distinguish from sibling tools like 'get_connection' (which fetches a single connection) or 'create_connection' (which creates one). This makes it vague compared to alternatives.

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 sibling tools like 'get_connection' for retrieving a specific connection or 'create_connection' for adding new ones. There's no context about prerequisites, such as authentication or permissions, leaving the agent to infer usage from the tool name alone.

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