get_import_error
Retrieve detailed import error information, including ID, filename, stacktrace, and timestamp, to diagnose and resolve issues in Apache Airflow clusters efficiently.
Instructions
[Tool Role]: Retrieves a specific import error by ID.
Args: import_error_id: The import error ID to retrieve
Returns: Single import error: import_error_id, filename, stacktrace, timestamp
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| import_error_id | Yes |
Implementation Reference
- The core handler function implementing the get_import_error tool. It makes an HTTP GET request to the Airflow API endpoint /importErrors/{import_error_id} to retrieve details of a specific import error.@mcp.tool() async def get_import_error(import_error_id: int) -> Dict[str, Any]: """[Tool Role]: Retrieves a specific import error.""" resp = await airflow_request("GET", f"/importErrors/{import_error_id}") resp.raise_for_status() return resp.json()
- src/mcp_airflow_api/tools/v1_tools.py:23-23 (registration)Registration call that includes the get_import_error tool for Airflow API v1 compatibility.common_tools.register_common_tools(mcp)
- src/mcp_airflow_api/tools/v2_tools.py:24-24 (registration)Registration call that includes the get_import_error tool for Airflow API v2 compatibility.common_tools.register_common_tools(mcp)