Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_import_error

Retrieve specific import error details by ID to diagnose and resolve DAG import failures in Apache Airflow.

Instructions

Get a specific import error by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
import_error_idYes

Implementation Reference

  • The MCP tool handler for 'get_import_error'. It takes an import_error_id, calls the underlying ImportErrorApi, converts the response to dict string, and wraps it in 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 via get_all_functions() which lists the 'get_import_error' tool for inclusion in the main 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),
        ]
  • src/main.py:13-13 (registration)
    Global registration: import of the importerror module's get_all_functions into the main.py server setup.
    from src.airflow.importerror import get_all_functions as get_importerror_functions
  • src/main.py:32-32 (registration)
    Global registration: mapping of APIType.IMPORTERROR to the importerror functions in the main dispatcher.
    APIType.IMPORTERROR: get_importerror_functions,
  • Initialization of the ImportErrorApi client instance used by the handler.
    import_error_api = ImportErrorApi(api_client)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets' an import error, implying a read-only operation, but doesn't specify if it requires authentication, what happens if the ID doesn't exist (e.g., returns null or error), or any rate limits. This leaves significant gaps for a tool that likely queries a system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the key action and resource, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, 0% schema description coverage, and no output schema, the description is insufficient. It doesn't explain what an 'import error' is in this context, what data is returned, or error handling, leaving the agent with incomplete information for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'by ID', which aligns with the single parameter 'import_error_id' in the schema. However, with 0% schema description coverage, the schema only indicates it's an integer without explaining what constitutes a valid ID (e.g., format, source). The description adds minimal value beyond the schema's basic type information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a specific import error by ID'), making the purpose immediately understandable. However, it doesn't differentiate from its sibling 'get_import_errors' (plural), which appears to retrieve multiple errors, leaving some ambiguity about when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_import_errors' or other error-related tools. It lacks context about prerequisites, such as needing an existing import error ID, or exclusions for when it shouldn't be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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