unpause_dag
Resume scheduling for paused Airflow DAGs to enable new workflow runs. This tool reactivates DAG execution within Apache Airflow clusters.
Instructions
[Tool Role]: Unpauses the specified Airflow DAG (allows scheduling new runs).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes |
Implementation Reference
- The handler function for the 'unpause_dag' tool. It takes a dag_id parameter, validates it, sends a PATCH request to the Airflow API to set is_paused to False, and returns the updated DAG status.@mcp.tool() async def unpause_dag(dag_id: str) -> Dict[str, Any]: """[Tool Role]: Unpauses the specified Airflow DAG (allows scheduling new runs).""" if not dag_id: raise ValueError("dag_id must not be empty") resp = await airflow_request("PATCH", f"/dags/{dag_id}", json={"is_paused": False}) resp.raise_for_status() dag_data = resp.json() return { "dag_id": dag_id, "is_paused": dag_data.get("is_paused") }
- src/mcp_airflow_api/tools/common_tools.py:293-293 (registration)The @mcp.tool() decorator registers the unpause_dag function as an MCP tool within the register_common_tools function.@mcp.tool()