Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_import_error

Identify and resolve specific import errors in Apache Airflow by retrieving detailed information using the import error ID. Access precise error data for troubleshooting and system maintenance.

Instructions

Get a specific import error by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
import_error_idYes

Implementation Reference

  • The async handler function for the 'get_import_error' MCP tool. It fetches the specific import error by ID from the Airflow API and returns it formatted as TextContent.
    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()))]
  • Module-level registration function that lists the 'get_import_error' tool with its name, description, and read-only status.
    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), ]
  • src/main.py:24-32 (registration)
    Top-level mapping that associates the IMPORTERROR API type with the importerror module's get_all_functions for aggregating tools during server startup.
    APITYPE_TO_FUNCTIONS = { APIType.CONFIG: get_config_functions, APIType.CONNECTION: get_connection_functions, APIType.DAG: get_dag_functions, APIType.DAGRUN: get_dagrun_functions, APIType.DAGSTATS: get_dagstats_functions, APIType.DATASET: get_dataset_functions, APIType.EVENTLOG: get_eventlog_functions, APIType.IMPORTERROR: get_importerror_functions,
  • Initialization of the ImportErrorApi client instance used by the tool handler.
    import mcp.types as types from airflow_client.client.api.import_error_api import ImportErrorApi from src.airflow.airflow_client import api_client import_error_api = ImportErrorApi(api_client)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yangkyeongmo/mcp-server-apache-airflow'

If you have feedback or need assistance with the MCP directory API, please join our Discord server