Skip to main content
Glama

get_dag

Retrieve detailed information about a specific Apache Airflow DAG in Amazon MWAA environments, including schedule, tags, and current state.

Instructions

Get details about a specific DAG.

Args: environment_name: Name of the MWAA environment dag_id: The DAG ID

Returns: Dictionary containing DAG details including schedule, tags, and state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environment_nameYes
dag_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the get_dag tool, which calls the Airflow API.
    async def get_dag(self, environment_name: str, dag_id: str) -> Dict[str, Any]:
        """Get DAG details via Airflow API."""
        return self._invoke_airflow_api(environment_name, "GET", f"/dags/{dag_id}")
  • The registration of the get_dag tool in the MCP server and its wrapper function.
    @mcp.tool(name="get_dag")
    async def get_dag(
        environment_name: str,
        dag_id: str,
    ) -> Dict[str, Any]:
        """Get details about a specific DAG.
    
        Args:
            environment_name: Name of the MWAA environment
            dag_id: The DAG ID
    
        Returns:
            Dictionary containing DAG details including schedule, tags, and state
        """
        return await tools.get_dag(environment_name, dag_id)
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses the return structure (dictionary with schedule, tags, state) and MWAA context via parameter docs. However, lacks critical behavioral details like error handling (what happens if dag_id doesn't exist), permissions required, or side effects.

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?

Uses structured docstring format (Args/Returns) that is appropriately sized and scannable. Each section earns its place by conveying essential information without redundancy.

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?

Reasonably complete for a simple 2-parameter read operation: documents parameters and return values. However, given zero annotations and lack of output schema visibility in the description, it could benefit from mentioning error cases (e.g., DAG not found) or MWAA-specific constraints.

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 has 0% description coverage. The Args section compensates by providing clear semantic meaning for both parameters: 'environment_name' is identified as 'Name of the MWAA environment' and 'dag_id' as 'The DAG ID', giving agents necessary context to provide correct values.

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?

States specific action ('Get') and resource ('details about a specific DAG'), implicitly distinguishing from sibling 'list_dags' which retrieves multiple DAGs. The Returns section clarifies specific details retrieved (schedule, tags, state).

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?

No explicit guidance on when to use this tool versus alternatives like 'list_dags' or 'get_dag_run'. No mention of prerequisites (e.g., environment must exist) or error conditions.

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