Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_pools

Retrieve and list Apache Airflow connection pools to manage database connections and monitor system resources.

Instructions

List pools

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
order_byNo

Implementation Reference

  • The handler function for the 'get_pools' tool. It accepts optional parameters for limit, offset, and order_by, calls the Airflow PoolApi to retrieve pools, and returns the response as text content.
    async def get_pools(
        limit: Optional[int] = None,
        offset: Optional[int] = None,
        order_by: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        List pools.
    
        Args:
            limit: The numbers of items to return.
            offset: The number of items to skip before starting to collect the result set.
            order_by: The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order.
    
        Returns:
            A list of pools.
        """
        # 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 = pool_api.get_pools(**kwargs)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The get_all_functions in pool.py registers the 'get_pools' tool by including it in the list of tuples returned for MCP tool registration. This list is imported and used in src/main.py.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]:
        """Return list of (function, name, description, is_read_only) tuples for registration."""
        return [
            (get_pools, "get_pools", "List pools", True),
            (get_pool, "get_pool", "Get a pool by name", True),
            (delete_pool, "delete_pool", "Delete a pool", False),
            (post_pool, "post_pool", "Create a pool", False),
            (patch_pool, "patch_pool", "Update a pool", False),
        ]
  • src/main.py:95-96 (registration)
    Generic registration loop in main.py where tools from get_all_functions (including get_pools) are added to the MCP app using Tool.from_function.
    for func, name, description, *_ in functions:
        app.add_tool(Tool.from_function(func, name=name, description=description))
  • Initialization of the pool_api client used by the get_pools handler to interact with Airflow's Pool API.
    pool_api = PoolApi(api_client)
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 provides none. 'List pools' doesn't indicate whether this is a read-only operation, whether it requires authentication, what the response format might be, whether it supports pagination (though parameters suggest it does), or any rate limits. For a tool with 3 parameters and no annotation coverage, this is completely inadequate.

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 maximally concise at just two words. While this represents severe under-specification rather than ideal conciseness, from a pure structural perspective, there's no wasted language or unnecessary elaboration. Every word (both of them) directly relates to the tool's purpose.

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 a tool with 3 parameters, 0% schema description coverage, no annotations, no output schema, and multiple sibling tools in the same domain, the description 'List pools' is completely inadequate. It provides minimal purpose information but fails to address parameter usage, behavioral characteristics, differentiation from alternatives, or expected outputs. This is insufficient for effective tool selection and invocation.

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 description coverage is 0%, meaning none of the 3 parameters (limit, offset, order_by) are documented in the schema. The description 'List pools' provides no information about any parameters, their purposes, or how they affect the listing operation. The description fails to compensate for the complete lack of parameter documentation in the schema.

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 'List pools' is a tautology that essentially restates the tool name 'get_pools'. While it indicates a listing action, it provides no information about what 'pools' are in this context or what specific listing operation is performed. Compared to sibling tools like 'get_pool' (singular) and 'post_pool', it doesn't clearly distinguish itself beyond the plural form.

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 that interact with pools (get_pool, post_pool, patch_pool, delete_pool), but the description offers no context about when to list all pools versus retrieve a specific one, create a new one, or modify/delete existing ones. No prerequisites, constraints, or comparison information is provided.

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