Skip to main content
Glama

list_dags

Retrieve and filter DAGs in Amazon MWAA environments to monitor workflows, using parameters like tags, ID patterns, and activity status.

Instructions

List all DAGs in an MWAA environment.

Args: environment_name: Name of the MWAA environment limit: Number of items to return (max 100) offset: Number of items to skip tags: Filter by DAG tags dag_id_pattern: Filter by DAG ID pattern (supports % wildcards) only_active: Only return active DAGs

Returns: Dictionary containing list of DAGs with their details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environment_nameYes
limitNo
offsetNo
tagsNo
dag_id_patternNo
only_activeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the list_dags tool that interacts with the Airflow API.
    async def list_dags(
        self,
        environment_name: str,
        limit: Optional[int] = 100,
        offset: Optional[int] = 0,
        tags: Optional[List[str]] = None,
        dag_id_pattern: Optional[str] = None,
        only_active: Optional[bool] = True,
    ) -> Dict[str, Any]:
        """List DAGs via Airflow API."""
        params: Dict[str, Any] = {
            "limit": limit,
            "offset": offset,
            "only_active": only_active,
        }
    
        if tags:
            params["tags"] = ",".join(tags)
        if dag_id_pattern:
            params["dag_id_pattern"] = dag_id_pattern
    
        return self._invoke_airflow_api(environment_name, "GET", "/dags", params=params)
  • MCP tool registration for 'list_dags', which wraps the tool implementation and handles parameter type conversion.
    @mcp.tool(name="list_dags")
    async def list_dags(
        environment_name: str,
        limit: Optional[int] = 100,
        offset: Optional[int] = 0,
        tags: Optional[List[str]] = None,
        dag_id_pattern: Optional[str] = None,
        only_active: Optional[bool] = True,
    ) -> Dict[str, Any]:
        """List all DAGs in an MWAA environment.
    
        Args:
            environment_name: Name of the MWAA environment
            limit: Number of items to return (max 100)
            offset: Number of items to skip
            tags: Filter by DAG tags
            dag_id_pattern: Filter by DAG ID pattern (supports % wildcards)
            only_active: Only return active DAGs
    
        Returns:
            Dictionary containing list of DAGs with their details
        """
        limit_int = int(limit) if limit is not None else 100
        offset_int = int(offset) if offset is not None else 0
    
        return await tools.list_dags(
            environment_name, limit_int, offset_int, tags, dag_id_pattern, only_active
        )
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return structure (Dictionary with DAG details) and pagination model (limit/offset), but omits safety/disdestructive traits, error behaviors, or authentication requirements that annotations would typically cover.

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 Args/Returns structure is appropriate for the 6-parameter complexity and zero schema coverage, though the Returns section is slightly redundant given the output schema exists. No sentences are wasted, but the docstring format is more verbose than a prose description.

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?

Given the 6 parameters with zero schema coverage, the description provides sufficient detail by documenting each parameter and the return type. The existence of an output schema excuses the minimal return value description, though sibling differentiation is absent.

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

Parameters5/5

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

With 0% schema description coverage, the Args section fully compensates by documenting all 6 parameters with precise semantics, including critical constraints like 'max 100' for limit and '% wildcards' for dag_id_pattern that are absent from the raw schema.

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 specific verb (List) and resource (DAGs) with scope (MWAA environment). However, it does not distinguish from the sibling tool 'get_dag' (which retrieves a single DAG), leaving the agent to infer the list vs. single-item distinction from the tool names alone.

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 like 'get_dag' for single DAG retrieval, nor does it mention prerequisites or exclusion criteria for the filters.

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