get_dag_source
Retrieve Airflow DAG source code to analyze tasks, dependencies, schedule, and configuration for debugging or understanding pipeline structure.
Instructions
Get the source code / definition of a DAG.
Use this to understand what a DAG does — its tasks, operators, dependencies, schedule, and configuration. Useful for debugging or understanding a pipeline's structure.
Args: dag_id: The DAG identifier. env: Target environment — 'dev', 'uat', 'test', or 'prod'. IMPORTANT: Do NOT guess or default. Ask the user which environment if not specified.
Returns the DAG details including file location, schedule, tags, and task list.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dag_id": "<dag_id>"
},
"name": "get_dag_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes | ||
| env | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |