list_dags
Retrieve and paginate all DAGs registered in an Apache Airflow cluster, with options to filter by DAG ID or name, and manage large datasets using limit and offset parameters.
Instructions
[Tool Role]: Lists all DAGs registered in the Airflow cluster with pagination support.
Args: limit: Maximum number of DAGs to return (default: 20) - For small queries: use default 100 - For large environments: use 500-1000 to get more DAGs at once - Maximum recommended: 1000 (to avoid API timeouts) offset: Number of DAGs to skip for pagination (default: 0) - Use 0 for first page - Use limit*page_number for subsequent pages - Example: offset=100 for page 2 when limit=100
Pagination Examples:
- First 20 DAGs: list_dags()
- Next 20 DAGs: list_dags(limit=20, offset=20)
- Page 3 of 50 DAGs each: list_dags(limit=50, offset=100)
- All DAGs at once: list_dags(limit=1000)
Use total_entries from response to determine if more pages exist: - has_more_pages = (offset + limit) < total_entries - next_offset = offset + limit - remaining_count = total_entries - (offset + limit)
Returns: Dict containing: - dags: List of DAG objects with comprehensive info (dag_id, dag_display_name, is_active, is_paused, description, schedule_interval, max_active_runs, max_active_tasks, owners, tags, next_dagrun info, last_parsed_time, has_import_errors, timetable_description) - total_entries: Total number of DAGs in Airflow (for pagination calculation) - limit: Requested limit (echoed back) - offset: Requested offset (echoed back) - returned_count: Actual number of DAGs returned in this response - has_more_pages: Boolean indicating if more pages are available - next_offset: Suggested offset for next page (if has_more_pages is True)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
fetch_all | No | ||
id_contains | No | ||
limit | No | ||
name_contains | No | ||
offset | No |