list_import_errors
Identifies and retrieves import errors in Apache Airflow clusters, enabling efficient debugging with customizable limits and offsets for precise error tracking.
Instructions
[Tool Role]: Lists import errors with optional filtering.
Args: limit: Maximum number of import errors to return (default: 20, increased from 20 for better coverage) offset: Number of entries to skip (default: 0)
Returns: List of import errors: import_errors, total_entries, limit, offset, pagination metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Implementation Reference
- The handler and registration for the 'list_import_errors' tool. This async function uses the @mcp.tool() decorator to register it with the MCP server and implements the logic to query Airflow's /importErrors endpoint with pagination parameters.@mcp.tool() 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()