Skip to main content
Glama
astronomer

astro-airflow-mcp

Official
by astronomer

get_dag_details

Retrieve comprehensive details for a specific Apache Airflow DAG, including schedule, pause status, owners, tags, and run configuration.

Instructions

Get detailed information about a specific Apache Airflow DAG.

Use this tool when the user asks about:

  • "Show me details for DAG X" or "What are the details of DAG Y?"

  • "Tell me about DAG Z" or "Get information for this specific DAG"

  • "What's the schedule for DAG X?" or "When does this DAG run?"

  • "Is DAG Y paused?" or "Show me the configuration of DAG Z"

  • "Who owns this DAG?" or "What are the tags for this workflow?"

Returns complete DAG information including:

  • dag_id: Unique identifier for the DAG

  • is_paused: Whether the DAG is currently paused

  • is_active: Whether the DAG is active

  • is_subdag: Whether this is a SubDAG

  • fileloc: File path where the DAG is defined

  • file_token: Unique token for the DAG file

  • owners: List of DAG owners

  • description: Human-readable description of what the DAG does

  • schedule_interval: Cron expression or timedelta for scheduling

  • tags: List of tags/labels for categorization

  • max_active_runs: Maximum number of concurrent runs

  • max_active_tasks: Maximum number of concurrent tasks

  • has_task_concurrency_limits: Whether task concurrency limits are set

  • has_import_errors: Whether the DAG has import errors

  • next_dagrun: When the next DAG run is scheduled

  • next_dagrun_create_after: Earliest time for next DAG run creation

Args: dag_id: The ID of the DAG to get details for

Returns: JSON with complete details about the specified DAG

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Internal implementation (handler) for get_dag_details tool. Calls adapter.get_dag(dag_id) and returns JSON.
    def _get_dag_details_impl(dag_id: str) -> str:
        """Internal implementation for getting details about a specific DAG.
    
        Args:
            dag_id: The ID of the DAG to get details for
    
        Returns:
            JSON string containing the DAG details
        """
        try:
            adapter = _get_adapter()
            data = adapter.get_dag(dag_id)
            return json.dumps(data, indent=2)
        except Exception as e:
            return str(e)
  • MCP tool registration and schema definition for get_dag_details. Decorated with @mcp.tool() and includes docstring describing input/output.
    @mcp.tool()
    def get_dag_details(dag_id: str) -> str:
        """Get detailed information about a specific Apache Airflow DAG.
    
        Use this tool when the user asks about:
        - "Show me details for DAG X" or "What are the details of DAG Y?"
        - "Tell me about DAG Z" or "Get information for this specific DAG"
        - "What's the schedule for DAG X?" or "When does this DAG run?"
        - "Is DAG Y paused?" or "Show me the configuration of DAG Z"
        - "Who owns this DAG?" or "What are the tags for this workflow?"
    
        Returns complete DAG information including:
        - dag_id: Unique identifier for the DAG
        - is_paused: Whether the DAG is currently paused
        - is_active: Whether the DAG is active
        - is_subdag: Whether this is a SubDAG
        - fileloc: File path where the DAG is defined
        - file_token: Unique token for the DAG file
        - owners: List of DAG owners
        - description: Human-readable description of what the DAG does
        - schedule_interval: Cron expression or timedelta for scheduling
        - tags: List of tags/labels for categorization
        - max_active_runs: Maximum number of concurrent runs
        - max_active_tasks: Maximum number of concurrent tasks
        - has_task_concurrency_limits: Whether task concurrency limits are set
        - has_import_errors: Whether the DAG has import errors
        - next_dagrun: When the next DAG run is scheduled
        - next_dagrun_create_after: Earliest time for next DAG run creation
    
        Args:
            dag_id: The ID of the DAG to get details for
    
        Returns:
            JSON with complete details about the specified DAG
        """
        return _get_dag_details_impl(dag_id=dag_id)
  • The tool is registered via the @mcp.tool() decorator on line 377 on the FastMCP instance 'mcp' (defined on line 179).
    @mcp.tool()
    def get_dag_details(dag_id: str) -> str:
        """Get detailed information about a specific Apache Airflow DAG.
    
        Use this tool when the user asks about:
        - "Show me details for DAG X" or "What are the details of DAG Y?"
        - "Tell me about DAG Z" or "Get information for this specific DAG"
        - "What's the schedule for DAG X?" or "When does this DAG run?"
        - "Is DAG Y paused?" or "Show me the configuration of DAG Z"
        - "Who owns this DAG?" or "What are the tags for this workflow?"
    
        Returns complete DAG information including:
        - dag_id: Unique identifier for the DAG
        - is_paused: Whether the DAG is currently paused
        - is_active: Whether the DAG is active
        - is_subdag: Whether this is a SubDAG
        - fileloc: File path where the DAG is defined
        - file_token: Unique token for the DAG file
        - owners: List of DAG owners
        - description: Human-readable description of what the DAG does
        - schedule_interval: Cron expression or timedelta for scheduling
        - tags: List of tags/labels for categorization
        - max_active_runs: Maximum number of concurrent runs
        - max_active_tasks: Maximum number of concurrent tasks
        - has_task_concurrency_limits: Whether task concurrency limits are set
        - has_import_errors: Whether the DAG has import errors
        - next_dagrun: When the next DAG run is scheduled
        - next_dagrun_create_after: Earliest time for next DAG run creation
    
        Args:
            dag_id: The ID of the DAG to get details for
    
        Returns:
            JSON with complete details about the specified DAG
        """
        return _get_dag_details_impl(dag_id=dag_id)
  • AirflowV3Adapter.get_dag() calls Airflow REST API endpoint dags/{dag_id}
    def get_dag(self, dag_id: str) -> dict[str, Any]:
        """Get details of a specific DAG."""
        return self._call(f"dags/{dag_id}")
  • AirflowV2Adapter.get_dag() calls Airflow REST API endpoint dags/{dag_id}
    def get_dag(self, dag_id: str) -> dict[str, Any]:
        """Get details of a specific DAG."""
        return self._call(f"dags/{dag_id}")
Behavior2/5

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

No annotations provided, so the description carries full burden. It does not disclose behavioral traits such as read-only nature, authentication requirements, rate limits, error handling, or potential side effects. Only describes what information is returned, not the behavior.

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?

The description is front-loaded with purpose and use cases, but it is somewhat lengthy with a detailed list of return fields. This could be streamlined since an output schema exists, but the structure is logical and easy to scan.

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 tool is a simple getter with one parameter and has an output schema, the description covers usage scenarios, parameter meaning, and return fields adequately. It does not address edge cases or error conditions, but for a straightforward retrieval tool it is sufficiently complete.

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?

The input schema has 0% description coverage and only one parameter dag_id. The description adds a brief but clear explanation: 'dag_id: The ID of the DAG to get details for', which provides necessary context beyond the bare schema definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Get detailed information about a specific Apache Airflow DAG' and lists numerous specific user queries, clearly distinguishing it from sibling tools like list_dags (listing all DAGs) or get_dag_run (specific run details).

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

Usage Guidelines4/5

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

Provides a comprehensive list of when to use the tool with example user queries, but does not explicitly mention when not to use it or suggest alternatives. However, the extensive examples make the use context clear.

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/astronomer/astro-airflow-mcp'

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