Skip to main content
Glama
astronomer

astro-airflow-mcp

Official
by astronomer

get_dag_source

Retrieve the Python source code for an Apache Airflow DAG to inspect its implementation, tasks, and workflow structure.

Instructions

Get the source code for a specific Apache Airflow DAG.

Use this tool when the user asks about:

  • "Show me the code for DAG X" or "What's the source of DAG Y?"

  • "How is DAG Z implemented?" or "What does the DAG file look like?"

  • "Can I see the Python code for this workflow?"

  • "What tasks are defined in the DAG code?"

Returns the DAG source file contents including:

  • content: The actual Python source code of the DAG file

  • file_token: Unique identifier for the source file

Args: dag_id: The ID of the DAG to get source code for

Returns: JSON with DAG source code and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes

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