delete_pool
Remove a specific pool from Apache Airflow to manage resource allocation and optimize task execution.
Instructions
Delete a pool
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool_name | Yes |
Implementation Reference
- src/airflow/pool.py:68-81 (handler)The main handler function for the 'delete_pool' tool. It takes a pool_name parameter, calls the Airflow PoolApi to delete the pool, and returns a confirmation message.async def delete_pool( pool_name: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Delete a pool. Args: pool_name: The pool name. Returns: A confirmation message. """ pool_api.delete_pool(pool_name=pool_name) return [types.TextContent(type="text", text=f"Pool '{pool_name}' deleted successfully.")]
- src/airflow/pool.py:12-20 (registration)The get_all_functions() which includes the registration tuple for 'delete_pool' tool, providing 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:95-96 (registration)The generic registration loop in main.py that adds all tools from get_all_functions() lists, including 'delete_pool', to the MCP app.for func, name, description, *_ in functions: app.add_tool(Tool.from_function(func, name=name, description=description))