Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_event_logs

Retrieve and filter Apache Airflow event logs to monitor DAG runs, task executions, and system events for debugging and auditing purposes.

Instructions

List log entries from event log

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
order_byNo
dag_idNo
task_idNo
run_idNo
map_indexNo
try_numberNo
eventNo
ownerNo
beforeNo
afterNo
included_eventsNo
excluded_eventsNo

Implementation Reference

  • The async handler function implementing the get_event_logs tool logic by building query parameters and calling the EventLogApi.
    async def get_event_logs(
        limit: Optional[int] = None,
        offset: Optional[int] = None,
        order_by: Optional[str] = None,
        dag_id: Optional[str] = None,
        task_id: Optional[str] = None,
        run_id: Optional[str] = None,
        map_index: Optional[int] = None,
        try_number: Optional[int] = None,
        event: Optional[str] = None,
        owner: Optional[str] = None,
        before: Optional[datetime] = None,
        after: Optional[datetime] = None,
        included_events: Optional[str] = None,
        excluded_events: 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
        if dag_id is not None:
            kwargs["dag_id"] = dag_id
        if task_id is not None:
            kwargs["task_id"] = task_id
        if run_id is not None:
            kwargs["run_id"] = run_id
        if map_index is not None:
            kwargs["map_index"] = map_index
        if try_number is not None:
            kwargs["try_number"] = try_number
        if event is not None:
            kwargs["event"] = event
        if owner is not None:
            kwargs["owner"] = owner
        if before is not None:
            kwargs["before"] = before
        if after is not None:
            kwargs["after"] = after
        if included_events is not None:
            kwargs["included_events"] = included_events
        if excluded_events is not None:
            kwargs["excluded_events"] = excluded_events
    
        response = event_log_api.get_event_logs(**kwargs)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Module registration function returning the tuple for registering the get_event_logs 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_event_logs, "get_event_logs", "List log entries from event log", True),
            (get_event_log, "get_event_log", "Get a specific log entry by ID", True),
        ]
  • src/main.py:95-96 (registration)
    Top-level registration loop where tools from get_all_functions() including get_event_logs are added to the MCP app.
    for func, name, description, *_ in functions:
        app.add_tool(Tool.from_function(func, name=name, description=description))
  • src/main.py:12-12 (registration)
    Import of the eventlog module's get_all_functions for top-level tool registration.
    from src.airflow.eventlog import get_all_functions as get_eventlog_functions
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states the action ('List log entries') without any information about permissions, rate limits, pagination (implied by limit/offset but not explained), response format, or side effects. For a tool with 14 parameters and no annotations, this is a critical gap in transparency.

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, efficient sentence with no wasted words: 'List log entries from event log.' It is front-loaded and appropriately sized for its minimal content, though this conciseness comes at the cost of completeness.

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

Completeness1/5

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

Given the complexity (14 parameters, no schema descriptions, no annotations, no output schema), the description is severely incomplete. It lacks essential context such as what the event log contains, how to filter or paginate, what the return structure is, and how it differs from similar tools. For a data retrieval tool with many options, this is inadequate.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 14 parameters are documented in the schema. The description adds no information about any parameters—it doesn't mention filtering by dag_id, task_id, date ranges (before/after), ordering, or pagination. With high parameter count and zero coverage, the description fails to compensate, leaving semantics entirely unclear.

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

Purpose3/5

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

The description 'List log entries from event log' states the basic action (list) and resource (log entries from event log), which is clear but vague. It doesn't specify what kind of event log (e.g., Airflow DAG events) or differentiate from sibling tools like get_event_log (singular) or get_log (general logs). The purpose is understandable but lacks specificity and sibling distinction.

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. With sibling tools like get_event_log (singular), get_log (general logs), and get_dataset_events (dataset-specific), there's no indication of context, prerequisites, or exclusions. The agent must infer usage from the tool name alone, which is insufficient.

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