all_dag_event_summary
Get a summary of event logs across all DAGs in Apache Airflow to monitor workflow execution and identify issues.
Instructions
[Tool Role]: Provides summary of event logs across all DAGs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core handler function decorated with @mcp.tool(). Fetches the 1000 most recent event logs from Airflow API and computes a summary grouped by DAG ID and event type, returning counts per combination along with totals.async def all_dag_event_summary() -> Dict[str, Any]: """[Tool Role]: Provides summary of event logs across all DAGs.""" resp = await airflow_request("GET", "/eventLogs?limit=1000") resp.raise_for_status() data = resp.json() event_summary = {} for event in data.get("event_logs", []): dag_id = event.get("dag_id", "unknown") event_type = event.get("event", "unknown") if dag_id not in event_summary: event_summary[dag_id] = {} if event_type not in event_summary[dag_id]: event_summary[dag_id][event_type] = 0 event_summary[dag_id][event_type] += 1 return { "event_summary": event_summary, "total_events": len(data.get("event_logs", [])), "unique_dags": len(event_summary) }
- src/mcp_airflow_api/tools/v1_tools.py:22-23 (registration)Calls register_common_tools(mcp) within v1_tools.py's register_tools function, registering the tool for Airflow API v1 (2.x). Preceded by setting the v1-specific airflow_request function.# Register all 56 common tools (includes management tools) common_tools.register_common_tools(mcp)
- src/mcp_airflow_api/tools/v2_tools.py:23-24 (registration)Calls register_common_tools(mcp) within v2_tools.py's register_tools function, registering the tool for Airflow API v2 (3.x+). Preceded by setting the v2-specific airflow_request function.# Register all 43 common tools common_tools.register_common_tools(mcp)