Skip to main content
Glama
Airflow MCP Server

Airflow MCP Server

by treerootboy

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

NameRequiredDescriptionDefault
dag_idYesThe DAG ID
end_dateYesEnd date in YYYY-MM-DD format or ISO 8601 format
task_idsNoOptional. List of task IDs to clear. If not specified, clear all tasks.
start_dateYesStart date in YYYY-MM-DD format or ISO 8601 format
only_failedNoIf true, only clear failed task instances. Default: true. Note: only_failed and only_running cannot both be true.
only_runningNoIf true, only clear running task instances. Default: false. Note: only_failed and only_running cannot both be true.
reset_dag_runsNoWhether to reset DAG run state to running. Default: true
include_subdagsNoWhether to include subdags. Default: false
include_parentdagNoWhether to include parent DAG. Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries full behavioral burden. It says the operation clears task instances and resets state, but does not disclose that this is a destructive mutation, whether cleared history is recoverable, what permissions are required, or how reset_dag_runs and include_subdags affect scope.

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 two sentences and front-loads the action and resource. It is efficient, though the second sentence is still quite terse given the operational complexity.

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

Completeness2/5

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

For a nine-parameter mutation tool with no annotations and no output schema, the description is too thin. It does not cover destructive effects, permissions, scope interactions, or post-clear expectations, leaving the agent to infer critical behavior from the schema alone.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents all nine parameters in detail, including the only_failed/only_running conflict. The description adds no parameter-specific meaning beyond the schema baseline.

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

Purpose4/5

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

The description states a specific verb and resource: "Clear task instances for a DAG," and adds the effect of resetting task state so they can be re-run. It is clear enough to distinguish this from read-only siblings like list-dag-runs, though it does not explicitly differentiate it from backfill-dag or trigger-dag.

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 phrase "so they can be re-run" implies a usage context: clearing failed or otherwise ineligible task instances before a re-run. However, it gives no explicit when-to-use guidance, no when-not-to-use conditions, and no comparison to alternatives such as backfill-dag or trigger-dag.

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