Skip to main content
Glama
madamak

Apache Airflow MCP Server

by madamak

airflow_clear_dag_run

Destructive

Clear all task instances in a specific DAG run to reset workflow execution, optionally including subDAGs, parent DAGs, or upstream/downstream tasks.

Instructions

Clear all task instances in a specific DAG run (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)

  • 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: If true, perform a dry-run only (optional)

  • 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
instanceNo
ui_urlNo
dag_idNo
dag_run_idNo
include_subdagsNo
include_parentdagNo
include_upstreamNo
include_downstreamNo
dry_runNo
reset_dag_runsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description adds significant value beyond annotations. While annotations already declare destructiveHint=true, the description explicitly labels the operation as 'destructive' in the first sentence, reinforcing the warning. It also describes the return format ('Response dict') and error behavior ('Raises: ToolError...'), which annotations don't cover. There's no contradiction with 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 well-structured with clear sections: purpose statement, parameter list with explanations, and return/error details. It's appropriately sized for a complex tool with 10 parameters. Minor improvement could be made by integrating parameter notes more seamlessly, but overall it's efficient and front-loaded with the critical 'destructive' warning.

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 (destructive operation, 10 parameters, 0% schema coverage), the description is remarkably complete. It covers purpose, parameter semantics, return format, and error handling. With destructiveHint annotation and output schema present, the description doesn't need to repeat safety warnings or output structure details, focusing instead on operational guidance.

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 fully compensates by providing detailed parameter explanations. It clarifies optional/required status, mutual exclusivity rules ('instance' vs 'ui_url'), precedence ('ui_url takes precedence'), and the purpose of each parameter (e.g., 'dry_run: If true, perform a dry-run only'). This adds essential meaning not present in the bare 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 starts with a clear, specific statement: 'Clear all task instances in a specific DAG run (destructive).' This explicitly states the verb ('clear'), resource ('task instances'), scope ('specific DAG run'), and includes a critical behavioral warning ('destructive'). It distinguishes from sibling tools like 'airflow_clear_task_instances' by specifying DAG run scope.

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

Usage Guidelines4/5

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

The description provides clear context for parameter usage, explaining that 'instance' and 'ui_url' are mutually exclusive and that 'ui_url' takes precedence. It also notes that 'dag_id' and 'dag_run_id' are required if 'ui_url' is not provided. However, it doesn't explicitly state when to use this tool versus alternatives like 'airflow_clear_task_instances' or mention prerequisites.

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