get_pool
Retrieve a specific Airflow connection pool by its name to manage and configure resource allocation within Apache Airflow deployments.
Instructions
Get a pool by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool_name | Yes |
Implementation Reference
- src/airflow/pool.py:52-65 (handler)The async handler function that implements the core logic of the 'get_pool' tool. It takes a pool_name parameter, calls the Airflow PoolApi to retrieve the pool, and returns the details as TextContent.async def get_pool( pool_name: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Get a pool by name. Args: pool_name: The pool name. Returns: The pool details. """ response = pool_api.get_pool(pool_name=pool_name) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/pool.py:16-16 (registration)The registration tuple for the 'get_pool' tool within the get_all_functions list, specifying the handler function, tool name, description, and read-only status.(get_pool, "get_pool", "Get a pool by name", True),
- src/airflow/pool.py:12-20 (helper)Helper function get_all_functions that returns the list of tool tuples for the pool API, including the 'get_pool' tool, which is used for registration.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:90-91 (registration)The registration loop in main.py that calls app.add_tool for each tool from get_pool_functions (among others), effectively registering the 'get_pool' tool.for func, name, description, *_ in functions: app.add_tool(func, name=name, description=description)
- src/main.py:33-33 (helper)Mapping in APITYPE_TO_FUNCTIONS that associates APIType.POOL with get_pool_functions (aliased get_all_functions from pool.py), enabling its use in registration.APIType.POOL: get_pool_functions,