list_pools
Retrieve all available pools from Airflow to manage task execution resources and monitor cluster capacity.
Instructions
[Tool Role]: Lists all pools in Airflow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Implementation Reference
- The core handler function for the 'list_pools' tool. It makes an API request to the Airflow pools endpoint with 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)Registration of common tools (including list_pools) for Airflow API v1 by calling register_common_tools after setting v1-specific airflow_request.common_tools.register_common_tools(mcp)
- src/mcp_airflow_api/tools/v2_tools.py:24-24 (registration)Registration of common tools (including list_pools) for Airflow API v2 by calling register_common_tools after setting v2-specific airflow_request.common_tools.register_common_tools(mcp)