airflow_clear_dag_run
Clears all task instances within a specific DAG run in Apache Airflow. Supports dry-run preview and optional inclusion of subDAGs, upstream, or downstream tasks.
Instructions
Destructively clear all task instances within one specific DAG run.
Parameters
instance: Instance key (optional; mutually exclusive with ui_url)
ui_url: Airflow UI URL to resolve instance (optional; takes precedence)
dag_id: DAG identifier (required if ui_url not provided)
dag_run_id: DAG run identifier (required if ui_url not provided)
include_subdags: Include subDAGs (optional)
include_parentdag: Include parent DAG (optional)
include_upstream: Include upstream tasks (optional)
include_downstream: Include downstream tasks (optional)
dry_run: Preview without mutating (default true); set false explicitly to clear
reset_dag_runs: Reset DagRun state (optional)
Returns
Response dict: { "dag_id": str, "dag_run_id": str, "cleared": object, "request_id": str }
Raises: ToolError with compact JSON payload (
code,message,request_id, optionalcontext)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | No | ||
| ui_url | No | ||
| dry_run | No | ||
| instance | No | ||
| dag_run_id | No | ||
| reset_dag_runs | No | ||
| include_subdags | No | ||
| include_upstream | No | ||
| include_parentdag | No | ||
| include_downstream | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||