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
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes |