clear_task_instance
Clear a failed Airflow task instance to retry it without restarting the entire DAG, useful for transient errors like network timeouts.
Instructions
Clear a task instance to retry it without re-triggering the entire DAG.
Use this when a task failed due to a transient issue (e.g. network timeout, temporary S3 error) and you want to retry just that task and optionally all tasks downstream of it.
Args: dag_id: The DAG identifier. dag_run_id: The run ID. task_id: The task to clear/retry. env: Target environment — 'dev', 'uat', 'test', or 'prod'. IMPORTANT: Do NOT guess or default. Ask the user which environment if not specified. include_downstream: If True, also clear all downstream tasks (default: False).
Returns confirmation with the list of cleared task instances.
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>",
"dag_run_id": "<dag_run_id>",
"task_id": "<task_id>"
},
"name": "clear_task_instance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes | ||
| dag_run_id | Yes | ||
| task_id | Yes | ||
| env | No | ||
| include_downstream | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |