Incident Response MCP for Apache Airflow
v1.0.2Diagnose Airflow failures from UI links with bounded logs and optional recovery actions.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
airflow_list_instances
List configured Airflow instance keys. Returns - Response dict: { "instances": [str], "default_instance": str | null, "request_id": str } - Raises: ToolError with compact JSON payload (`code`, `message`, `request_id`, optional `context`)
airflow_describe_instance
Describe a configured Airflow instance (host + metadata, never secrets). Parameters - instance: Instance key (e.g., "data-stg") Returns - Response dict: { "instance", "host", "api_version", "verify_ssl", "auth_type", "request_id": str } - Raises: ToolError with compact JSON payload (`code`, `message`, `request_id`, optional `context`)
| Parameter | Type | Description |
|---|---|---|
instance * | string |
airflow_resolve_url
Parse an Airflow UI URL, resolve instance and identifiers. Parameters - url: Airflow UI URL (http/https) Returns - Response dict: { "instance", "dag_id"?, "dag_run_id"?, "task_id"?, "try_number"?, "route", "request_id" } - Raises: ToolError with compact JSON payload (`code`, `message`, `request_id`, optional `context`)
| Parameter | Type | Description |
|---|---|---|
url * | string |
airflow_list_dags
List DAGs (pause state + UI link) for the target instance. Parameters - instance: Instance key (optional; mutually exclusive with ui_url) - ui_url: Airflow UI URL to resolve instance (optional; takes precedence - must match a configured host) - limit: Max results (default 100; accepts int/float/str, coerced to non-negative int, fractional values truncated) - offset: Offset for pagination (default 0; accepts int/float/str, coerced to non-negative int, fractional values truncated) Returns - Response dict: { "dags": [{ "dag_id", "is_paused", "ui_url" }], "count": int, "request_id": str } - Rais…
| Parameter | Type | Description |
|---|---|---|
instance | ||
limit | ||
offset | ||
ui_url |
airflow_get_dag
Get DAG details and a UI link. Parameters - instance | ui_url: Provide one; `ui_url` auto-resolves/validates the host. - dag_id: Required when only `instance` is supplied. Returns - Response dict: { "dag": object, "ui_url": str, "request_id": str } - Raises: ToolError with compact JSON payload (`code`, `message`, `request_id`, optional `context`)
| Parameter | Type | Description |
|---|---|---|
dag_id | ||
instance | ||
ui_url |
airflow_list_dag_runs
List DAG runs (defaults to execution_date DESC) with per-run UI URLs. Parameters - instance: Instance key (optional) - ui_url: Airflow UI URL to resolve instance/dag_id (optional) - dag_id: DAG identifier (required if ui_url not provided) - limit: Max results (default 100; accepts int/float/str, coerced to non-negative int, fractional values truncated) - offset: Offset for pagination (default 0; accepts int/float/str, coerced to non-negative int, fractional values truncated) - state: List of states to filter by (optional) - order_by: Optional `"start_date"`, `"end_date"`, `"execution_date"`,…
| Parameter | Type | Description |
|---|---|---|
dag_id | ||
descending | boolean | |
instance | ||
limit | ||
offset | ||
order_by | ||
state | ||
ui_url |
airflow_get_dag_run
Get a single DAG run and a UI link. Parameters - instance: Instance key (optional) - ui_url: Airflow UI URL to resolve instance/dag/dag_run (optional) - dag_id: DAG identifier - dag_run_id: DAG run identifier Returns - Response dict: { "dag_run": object, "ui_url": str, "request_id": str }
| Parameter | Type | Description |
|---|---|---|
dag_id | ||
dag_run_id | ||
instance | ||
ui_url |
airflow_list_task_instances
List task instances within one DAG run, including state and attempt log URLs. Parameters - instance: Instance key (optional) - ui_url: Airflow UI URL to resolve instance/dag/dag_run (optional) - dag_id: DAG identifier - dag_run_id: DAG run identifier - limit: Max results (default 100; accepts int/float/str, coerced to non-negative int, fractional values truncated) - offset: Offset for pagination (default 0; accepts int/float/str, coerced to non-negative int, fractional values truncated) - state: Optional list of task states (case-insensitive). When provided, only matching states are returned.…
| Parameter | Type | Description |
|---|---|---|
dag_id | ||
dag_run_id | ||
instance | ||
limit | ||
offset | ||
state | ||
task_ids | ||
ui_url |
airflow_get_task_instance
Return task metadata, config, attempt summary, optional rendered fields, and UI URLs. Parameters - instance | ui_url: Target selection (URL precedence) - dag_id, dag_run_id, task_id: Required identifiers (unless resolved from ui_url) - include_rendered: When true, include rendered template fields (truncated using max_rendered_bytes) - max_rendered_bytes: Byte cap for rendered fields payload (default 100KB; accepts int/float/str, coerced to positive int, fractional values truncated) Returns - Response dict: { "task_instance": {...}, "task_config": {...}, "attempts": {...}, "ui_url": {...}, "r…
| Parameter | Type | Description |
|---|---|---|
dag_id | ||
dag_run_id | ||
include_rendered | boolean | |
instance | ||
max_rendered_bytes | ||
task_id | ||
ui_url |
airflow_get_task_instance_logs
Fetch task instance logs with optional filtering and truncation. Large log handling: Logs >100MB automatically tail to last 10,000 lines (sets auto_tailed=true). Host-segmented responses are flattened into a single string using headers of the form `--- [worker] ---`, ensuring agents can reason about multi-host output. The tool requires an explicit `try_number`; callers should first retrieve it via `airflow_get_task_instance`. Filter order of operations: 1. Auto-tail: If log >100MB, take last 10,000 lines 2. tail_lines: Extract last N lines from log 3. filter_level: Find matching lines by lev…
| Parameter | Type | Description |
|---|---|---|
context_lines | ||
dag_id | ||
dag_run_id | ||
filter_level | ||
instance | ||
max_bytes | integer | |
tail_lines | ||
task_id | ||
try_number | ||
ui_url |
airflow_dataset_events
List dataset events. Parameters - instance: Instance key (optional) - ui_url: Airflow UI URL to resolve instance (optional) - dataset_uri: Dataset URI (required) - limit: Max results (default 50; accepts int/float/str, coerced to non-negative int, fractional values truncated) Returns - Response dict: { "events": [object], "count": int, "request_id": str }
| Parameter | Type | Description |
|---|---|---|
dataset_uri | ||
instance | ||
limit | ||
ui_url |