Skip to main content
Glama

unpause_dag

Resume scheduling for paused Airflow DAGs to enable new workflow runs. This tool reactivates DAG execution within Apache Airflow clusters.

Instructions

[Tool Role]: Unpauses the specified Airflow DAG (allows scheduling new runs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes

Implementation Reference

  • The handler function for the 'unpause_dag' tool. It takes a dag_id parameter, validates it, sends a PATCH request to the Airflow API to set is_paused to False, and returns the updated DAG status.
    @mcp.tool()
    async def unpause_dag(dag_id: str) -> Dict[str, Any]:
        """[Tool Role]: Unpauses the specified Airflow DAG (allows 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": False})
        resp.raise_for_status()
        dag_data = resp.json()
        return {
            "dag_id": dag_id,
            "is_paused": dag_data.get("is_paused")
        }
  • The @mcp.tool() decorator registers the unpause_dag function as an MCP tool within the register_common_tools function.
    @mcp.tool()

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