Skip to main content
Glama
biswasbiplob

mwaa-mcp-server

by biswasbiplob

clear-task-instances

Reset Airflow DAG task instances to enable re-runs, previewing by default and filtering by failure, run, or task.

Instructions

Clear task instances for a DAG, allowing them to be re-run.

    Resets task instances to a cleared state so they can be retried. By default
    only clears failed tasks and runs in dry-run mode for safety.

    Requires the --allow-write flag.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        dag_run_id: Optional DAG run ID to scope the clear.
        task_ids: Optional list of task IDs to clear.
        only_failed: Only clear failed tasks (default: true).
        dry_run: Preview without clearing (default: true).
        reset_dag_runs: Set DAG runs to RUNNING (default: false).
        include_downstream: Also clear downstream tasks.
        include_upstream: Also clear upstream tasks.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the cleared (or previewed) task instances.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYesThe DAG ID.
regionNoAWS region override.
dry_runNoIf true, return the list of task instances that would be cleared without actually clearing them. Defaults to true if omitted.
task_idsNoList of task IDs to clear. If omitted, all tasks are cleared.
dag_run_idNoClear task instances only for this DAG run ID.
only_failedNoOnly clear failed task instances. Defaults to true if omitted.
profile_nameNoAWS CLI profile name override.
reset_dag_runsNoSet state of affected DAG runs to RUNNING. Defaults to false if omitted.
environment_nameNoName of the MWAA environment. If omitted and only one environment exists, it is used automatically.
include_upstreamNoAlso clear upstream tasks. Defaults to false if omitted.
include_downstreamNoAlso clear downstream tasks. Defaults to false if omitted.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the clearing (mutation) behavior, the default dry-run safety, the failed-only default, and the requirement of --allow-write. It also mentions the return type. It stops short of describing irreversibility or the exact effect on DAG runs, but the core behavioral traits are well covered.

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 opening sentences are concise and front-loaded, clearly summarizing the tool's purpose and safety behavior. The Args section is lengthy but structured and provides default values for each parameter. It avoids unnecessary verbosity while containing all necessary information.

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

Completeness4/5

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

For an 11-parameter mutation tool with no output schema, the description covers the purpose, safety defaults, required flag, and return behavior. It does not describe the output structure but explicitly states what is returned (cleared or previewed task instances). Overall, the description is sufficiently complete for an agent to select and invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so all parameters are documented in the input schema. The description adds value by stating default values for only_failed, dry_run, reset_dag_runs, include_upstream, and include_downstream, which are not fully explicit in the schema. It also clarifies the scoping effect of dag_run_id and task_ids, supplementing the schema descriptions.

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 task instances for a DAG') and the intended outcome ('allowing them to be re-run'). It distinguishes itself from sibling tools like list-task-instances or get-task-instance by focusing on clearing/resetting state, and it adds specific behavior details (failed-only, dry-run) that sharpen the purpose.

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 when the tool is used (retrying tasks by clearing their state) and notes the critical prerequisite of the --allow-write flag. It also explains the safety default of dry-run mode. However, it does not explicitly name alternatives or exclusions, though the use case is reasonably implied by the reset/retry semantics.

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/biswasbiplob/mwaa-mcp-server'

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