Skip to main content
Glama

pause_dag

Pause an Airflow DAG to prevent scheduling new runs, useful for maintenance or debugging workflows.

Instructions

[Tool Role]: Pauses the specified Airflow DAG (prevents scheduling new runs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The pause_dag tool handler: pauses the Airflow DAG by sending a PATCH request to /dags/{dag_id} with {"is_paused": True}. Includes @mcp.tool() decorator for MCP registration and input validation.
    @mcp.tool()
    async def pause_dag(dag_id: str) -> Dict[str, Any]:
        """[Tool Role]: Pauses the specified Airflow DAG (prevents scheduling new runs)."""
        if not dag_id:
            raise ValueError("dag_id must not be empty")
        resp = await airflow_request("PATCH", f"/dags/{dag_id}", json={"is_paused": True})
        resp.raise_for_status()
        dag_data = resp.json()
        return {
            "dag_id": dag_id,
            "is_paused": dag_data.get("is_paused")
        }
  • Registration of common tools (including pause_dag) for Airflow API v1 by setting v1-specific airflow_request and calling register_common_tools(mcp).
    common_tools.airflow_request = airflow_request_v1
    
    # Register all 56 common tools (includes management tools)
    common_tools.register_common_tools(mcp)
  • Registration of common tools (including pause_dag) for Airflow API v2 by setting v2-specific airflow_request and calling register_common_tools(mcp).
    common_tools.airflow_request = airflow_request_v2
    
    # Register all 43 common tools
    common_tools.register_common_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool pauses a DAG to prevent new runs, which implies a mutation (write operation) and hints at a state change. However, it doesn't disclose behavioral traits like permissions required, whether the pause is reversible, error conditions, or side effects (e.g., impact on existing runs). This leaves significant gaps for a mutation tool.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action and effect. It uses a '[Tool Role]' prefix for clarity and wastes no words, making it appropriately sized for its purpose.

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

Completeness3/5

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

Given the tool's complexity (a mutation with no annotations), 1 parameter, and an output schema (which reduces need to describe returns), the description is incomplete. It covers the basic action but lacks details on usage context, behavioral transparency, and parameter semantics. It's minimally adequate but has clear gaps for safe and effective use.

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?

The input schema has 1 parameter with 0% description coverage, and the tool description doesn't add any parameter-specific information. It mentions 'specified Airflow DAG' but doesn't explain what 'dag_id' represents or provide examples. With low schema coverage, the description fails to compensate, but since there's only one parameter, the baseline is adjusted to 3 as the minimal viable level.

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 clearly states the tool's purpose: 'Pauses the specified Airflow DAG (prevents scheduling new runs).' It includes a specific verb ('pauses'), resource ('Airflow DAG'), and effect ('prevents scheduling new runs'). However, it doesn't explicitly differentiate from its sibling 'unpause_dag' beyond the opposite action, missing a direct comparison.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., DAG must exist or be running), exclusions, or compare it to related tools like 'unpause_dag' or 'trigger_dag'. Usage is implied by the action but lacks explicit context.

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/call518/MCP-Airflow-API'

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