list_pools
Retrieve and view all pools in an Apache Airflow instance, including their configurations and usage details, with options for pagination and limit control.
Instructions
[Tool Role]: List all pools in the Airflow instance.
Args: limit: Maximum number of pools to return (default: 20) offset: Number of pools to skip for pagination (default: 0)
Returns: List of pools with their configuration and usage information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Implementation Reference
- The primary handler function for the 'list_pools' MCP tool. Decorated with @mcp.tool(), it queries the Airflow Pools API endpoint with optional pagination parameters and returns the response.@mcp.tool() async def list_pools(limit: int = 20, offset: int = 0) -> Dict[str, Any]: """[Tool Role]: Lists all pools in Airflow.""" params = {'limit': limit, 'offset': offset} query_string = "&".join([f"{k}={v}" for k, v in params.items()]) resp = await airflow_request("GET", f"/pools?{query_string}") resp.raise_for_status() return resp.json()
- src/mcp_airflow_api/tools/v1_tools.py:23-23 (registration)Calls register_common_tools(mcp) to register the list_pools tool (and all common tools) for Airflow API v1 compatibility.common_tools.register_common_tools(mcp)
- src/mcp_airflow_api/tools/v2_tools.py:24-24 (registration)Calls register_common_tools(mcp) to register the list_pools tool (and all common tools) for Airflow API v2 compatibility.common_tools.register_common_tools(mcp)
- Sets the global airflow_request function to the v1 implementation before registering tools, enabling the list_pools handler to make API calls.common_tools.airflow_request = airflow_request_v1