list_import_errors
Retrieve import errors from Airflow to identify and resolve DAG loading issues, enabling efficient troubleshooting of deployment problems.
Instructions
[Tool Role]: Lists import errors in Airflow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Implementation Reference
- The core handler function that implements the list_import_errors tool by querying the Airflow /importErrors API endpoint with optional pagination parameters.async def list_import_errors(limit: int = 20, offset: int = 0) -> Dict[str, Any]: """[Tool Role]: Lists import errors in Airflow.""" params = {'limit': limit, 'offset': offset} query_string = "&".join([f"{k}={v}" for k, v in params.items()]) resp = await airflow_request("GET", f"/importErrors?{query_string}") resp.raise_for_status() return resp.json()
- src/mcp_airflow_api/tools/v1_tools.py:23-23 (registration)Registers the common tools including list_import_errors for Airflow API v1 by calling register_common_tools after setting the v1-specific airflow_request function.common_tools.register_common_tools(mcp)
- src/mcp_airflow_api/tools/v2_tools.py:24-24 (registration)Registers the common tools including list_import_errors for Airflow API v2 by calling register_common_tools after setting the v2-specific airflow_request function.common_tools.register_common_tools(mcp)