Skip to main content
Glama
madamak

Apache Airflow MCP Server

by madamak

airflow_clear_task_instances

Clear task instances in Apache Airflow DAGs using native filters to remove execution history and reset states for troubleshooting or reruns.

Instructions

Clear task instances for a DAG across one or more runs using Airflow's native filter set (destructive).

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)

  • task_ids: List of task IDs to clear (optional)

  • start_date: ISO8601 start date filter (optional)

  • end_date: ISO8601 end date filter (optional)

  • include_subdags: Include subDAGs (optional)

  • include_parentdag: Include parent DAG (optional)

  • include_upstream: Include upstream tasks (optional)

  • include_downstream: Include downstream tasks (optional)

  • include_future: Include future runs (optional)

  • include_past: Include past runs (optional)

  • dry_run: If true, perform a dry-run only (optional)

  • reset_dag_runs: Reset DagRun state (optional)

Returns

  • Response dict: { "dag_id": str, "cleared": object, "request_id": str }

  • Raises: ToolError with compact JSON payload (code, message, request_id, optional context)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNo
ui_urlNo
dag_idNo
task_idsNo
start_dateNo
end_dateNo
include_subdagsNo
include_parentdagNo
include_upstreamNo
include_downstreamNo
include_futureNo
include_pastNo
dry_runNo
reset_dag_runsNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/madamak/apache-airflow-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server