get_import_error
Retrieve specific import error details from Apache Airflow by providing the error ID to diagnose and resolve DAG import failures.
Instructions
Get a specific import error by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| import_error_id | Yes |
Implementation Reference
- src/airflow/importerror.py:37-41 (handler)MCP tool handler for get_import_error. Accepts import_error_id (int), fetches the import error via ImportErrorApi, and returns it as text content.async def get_import_error( import_error_id: int, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: response = import_error_api.get_import_error(import_error_id=import_error_id) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/importerror.py:11-16 (registration)Registration definition that includes the get_import_error tool, specifying its handler, name, description, and read-only status. This is imported and used in src/main.py to register the tool with the MCP server.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), ]