Skip to main content
Glama

trigger_dag_run

Initiate workflow execution in Amazon MWAA by starting a new DAG run with optional configuration and custom run ID.

Instructions

Trigger a new DAG run.

Args: environment_name: Name of the MWAA environment dag_id: The DAG ID to trigger dag_run_id: Custom run ID (optional, will be auto-generated if not provided) conf: Configuration JSON for the DAG run note: Optional note for the DAG run

Returns: Dictionary containing the created DAG run details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environment_nameYes
dag_idYes
dag_run_idNo
confNo
noteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the trigger_dag_run tool logic, which invokes the Airflow API.
    async def trigger_dag_run(
        self,
        environment_name: str,
        dag_id: str,
        dag_run_id: Optional[str] = None,
        conf: Optional[Dict[str, Any]] = None,
        note: Optional[str] = None,
    ) -> Dict[str, Any]:
        """Trigger a DAG run via Airflow API."""
        self._check_readonly("trigger_dag_run")
    
        data: Dict[str, Any] = {}
    
        if dag_run_id:
            data["dag_run_id"] = dag_run_id
        else:
            data["dag_run_id"] = f"manual__{datetime.now(timezone.utc).isoformat()}"
    
        if conf:
            data["conf"] = conf
        if note:
            data["note"] = note
    
        return self._invoke_airflow_api(
            environment_name, "POST", f"/dags/{dag_id}/dagRuns", json_data=data
        )
  • Tool registration for trigger_dag_run in the MCP server.
    @mcp.tool(name="trigger_dag_run")
    async def trigger_dag_run(
        environment_name: str,
        dag_id: str,
        dag_run_id: Optional[str] = None,
        conf: Optional[Dict[str, Any]] = None,
        note: Optional[str] = None,
    ) -> Dict[str, Any]:
        """Trigger a new DAG run.
    
        Args:
            environment_name: Name of the MWAA environment
            dag_id: The DAG ID to trigger
            dag_run_id: Custom run ID (optional, will be auto-generated if not provided)
            conf: Configuration JSON for the DAG run
            note: Optional note for the DAG run
    
        Returns:
            Dictionary containing the created DAG run details
        """
        return await tools.trigger_dag_run(environment_name, dag_id, dag_run_id, conf, note)
Behavior2/5

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

No annotations are provided, so the description carries full disclosure burden. While 'trigger' implies mutation, it fails to specify if the call waits for completion, what happens if the DAG is paused, potential failure modes, or required IAM permissions. The Returns section mentions output format but output schema exists separately.

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

Conciseness3/5

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

Uses structured Args/Returns sections which aids readability, but the Returns section is redundant given the output schema exists. The opening sentence 'Trigger a new DAG run' is appropriately concise but minimal given the lack of behavioral annotations.

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?

With output schema present, the description appropriately avoids detailing return values (though it repeats them). However, for a 5-parameter execution tool with zero annotations, it lacks critical operational context: side effects, prerequisites, and execution semantics that would guide safe invocation.

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 description coverage is 0%, requiring the description to compensate fully. The Args section documents all 5 parameters, including helpful details like dag_run_id auto-generation behavior and optional flags. However, 'conf' lacks detail on expected JSON structure beyond 'Configuration JSON'.

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 'Trigger a new DAG run' with specific verb (trigger) and resource (DAG run). It implicitly distinguishes from sibling tools like get_dag_run (retrieve existing) and list_dag_runs (list multiple), though it could explicitly clarify this initiates execution versus monitoring.

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?

Provides no guidance on when to use this tool versus alternatives, prerequisites (e.g., DAG must exist), or preconditions to check (e.g., checking DAG is not paused via get_dag). No mention of synchronous vs asynchronous behavior or polling strategies.

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

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