get_pool
Retrieve an Airflow connection pool by name to manage and monitor resource allocation within your data pipeline workflows.
Instructions
Get a pool by name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool_name | Yes |
Input Schema (JSON Schema)
{
"properties": {
"pool_name": {
"title": "Pool Name",
"type": "string"
}
},
"required": [
"pool_name"
],
"type": "object"
}
Implementation Reference
- src/airflow/pool.py:52-65 (handler)The main handler function for the 'get_pool' tool. It takes a pool_name parameter, calls the Airflow PoolApi to retrieve the pool, and returns the details as MCP 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 returns a list of tuples including the registration for 'get_pool': (get_pool, 'get_pool', 'Get a pool by name', True). This is used by main.py to register the tool with the MCP server.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:33-33 (registration)Mapping of APIType.POOL to get_pool_functions (imported from pool.py), which provides the list of pool-related tools for registration.APIType.POOL: get_pool_functions,
- src/main.py:90-91 (registration)The loop that registers each tool from the functions list (including get_pool) by calling app.add_tool.for func, name, description, *_ in functions: app.add_tool(func, name=name, description=description)