get_import_errors
Retrieve and list import errors from Apache Airflow deployments to identify and resolve DAG loading issues.
Instructions
List import errors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| order_by | No |
Implementation Reference
- src/airflow/importerror.py:19-35 (handler)The async handler function for the 'get_import_errors' MCP tool. It constructs kwargs from optional parameters (limit, offset, order_by), calls ImportErrorApi.get_import_errors, converts the response to dict string, and returns it wrapped in types.TextContent.async def get_import_errors( limit: Optional[int] = None, offset: Optional[int] = None, order_by: Optional[str] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: # Build parameters dictionary kwargs: Dict[str, Any] = {} if limit is not None: kwargs["limit"] = limit if offset is not None: kwargs["offset"] = offset if order_by is not None: kwargs["order_by"] = order_by response = import_error_api.get_import_errors(**kwargs) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/importerror.py:11-16 (registration)Registration function that provides the tuple for registering the 'get_import_errors' tool: (function, name, description, read_only). This is likely used by the main MCP server to register the tool.def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_import_errors, "get_import_errors", "List import errors", True), (get_import_error, "get_import_error", "Get a specific import error by ID", True), ]