Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

get_connection

Retrieve connection details from Apache Airflow deployments by specifying a connection ID, enabling AI assistants to access and manage Airflow configuration data.

Instructions

Get a connection by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conn_idYes

Implementation Reference

  • The async handler function implementing the 'get_connection' tool logic. Retrieves an Airflow connection by ID using the ConnectionApi and formats the response as TextContent.
    async def get_connection(conn_id: str) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        response = connection_api.get_connection(connection_id=conn_id)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The get_all_functions that returns the registration details for connection tools, including the tuple for 'get_connection'.
    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-24 (registration)
    Mapping of APIType.CONNECTION to get_connection_functions in the APITYPE_TO_FUNCTIONS dictionary, used to load tools during server startup.
    APIType.CONNECTION: get_connection_functions,
  • src/main.py:6-6 (registration)
    Import of get_all_functions from connection.py, aliased for use in main.py tool registration.
    from src.airflow.connection import get_all_functions as get_connection_functions
Behavior2/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. It states it's a 'Get' operation, implying read-only behavior, but doesn't disclose any behavioral traits such as error handling (e.g., what happens if the ID is invalid), authentication requirements, rate limits, or return format. The description is minimal and lacks critical operational context.

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 with a single sentence 'Get a connection by ID', which is front-loaded and wastes no words. It efficiently conveys the core action without unnecessary details, making it easy to parse quickly.

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 tool's complexity (a read operation with 1 parameter), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It fails to provide sufficient context for effective use, such as what data is returned, error conditions, or how it fits into the broader system with many sibling tools.

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

Parameters2/5

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

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic information. The description mentions 'by ID', which adds some meaning by indicating the parameter is an identifier, but it doesn't specify the ID format, source, or constraints, leaving significant gaps in understanding.

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 'Get a connection by ID' clearly states the verb ('Get') and resource ('connection'), but it's vague about what a 'connection' entails in this context. It distinguishes from siblings like 'create_connection' or 'delete_connection' by focusing on retrieval, but lacks specificity about the connection type or system.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid connection ID), when not to use it, or compare it to similar tools like 'list_connections' for browsing connections without a specific ID.

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