Skip to main content
Glama
madamak

Apache Airflow MCP Server

airflow_clear_dag_run

Destructive

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, optional context)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idNo
ui_urlNo
dry_runNo
instanceNo
dag_run_idNo
reset_dag_runsNo
include_subdagsNo
include_upstreamNo
include_parentdagNo
include_downstreamNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate destructiveHint=true. The description adds the destructive nature, dry_run safety mechanism (default true, set false to clear), return format, and error handling (ToolError with JSON payload). This provides behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose and well-structured with bullet points for parameters and returns. While necessary given the number of parameters, it is somewhat lengthy but without wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 parameters, no schema descriptions, but output schema exists), the description covers purpose, parameter usage, return values, and error handling comprehensively. It is fully sufficient for an agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates fully by listing all 10 parameters with brief explanations, including mutual exclusions and defaults. This adds essential meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('clear all task instances') and the resource ('within one specific DAG run'). It distinguishes from siblings like 'airflow_clear_task_instances' by scoping to a single DAG run.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for clearing a single DAG run but does not explicitly contrast with siblings or provide when-not-to-use guidance. It does specify mutual exclusivity of parameters and dry_run behavior, aiding correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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