get_pool
Retrieve a specific connection pool by name from Apache Airflow to manage database or resource connections within workflow orchestrations.
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 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:12-20 (registration)The get_all_functions utility that provides the registration tuple for the 'get_pool' tool, including the function reference, name, description, and read-only flag.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:16-16 (registration)Import of the pool module's get_all_functions (aliased as get_pool_functions) used for registering pool-related tools including 'get_pool'.from src.airflow.pool import get_all_functions as get_pool_functions
- src/main.py:35-35 (registration)Mapping of APIType.POOL to get_pool_functions, which enables the registration of the 'get_pool' tool during server startup.APIType.POOL: get_pool_functions,