clear-task-instances
Reset Airflow task instances for a DAG so they can be re-run. Filter by date range, task IDs, failed/running status, and reset related DAG runs.
Instructions
Clear task instances for a DAG. This resets the state of tasks so they can be re-run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dag_id": "<dag_id>",
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "clear-task-instances"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes | The DAG ID | |
| end_date | Yes | End date in YYYY-MM-DD format or ISO 8601 format | |
| task_ids | No | Optional. List of task IDs to clear. If not specified, clear all tasks. | |
| start_date | Yes | Start date in YYYY-MM-DD format or ISO 8601 format | |
| only_failed | No | If true, only clear failed task instances. Default: true. Note: only_failed and only_running cannot both be true. | |
| only_running | No | If true, only clear running task instances. Default: false. Note: only_failed and only_running cannot both be true. | |
| reset_dag_runs | No | Whether to reset DAG run state to running. Default: true | |
| include_subdags | No | Whether to include subdags. Default: false | |
| include_parentdag | No | Whether to include parent DAG. Default: false |