Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_upstream_dataset_events

Retrieve dataset events from upstream dependencies for a specific DAG run in Apache Airflow to monitor data lineage and dependencies.

Instructions

Get dataset events for a DAG run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes

Implementation Reference

  • Handler function that calls the Airflow API to get upstream dataset events for a DAG run and returns the response as text.
    async def get_upstream_dataset_events(
        dag_id: str, dag_run_id: str
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        response = dag_run_api.get_upstream_dataset_events(dag_id=dag_id, dag_run_id=dag_run_id)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registration of tools including get_upstream_dataset_events in the get_all_functions list.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]:
        """Return list of (function, name, description, is_read_only) tuples for registration."""
        return [
            (post_dag_run, "post_dag_run", "Trigger a DAG by ID", False),
            (get_dag_runs, "get_dag_runs", "Get DAG runs by ID", True),
            (get_dag_runs_batch, "get_dag_runs_batch", "List DAG runs (batch)", True),
            (get_dag_run, "get_dag_run", "Get a DAG run by DAG ID and DAG run ID", True),
            (update_dag_run_state, "update_dag_run_state", "Update a DAG run state by DAG ID and DAG run ID", False),
            (delete_dag_run, "delete_dag_run", "Delete a DAG run by DAG ID and DAG run ID", False),
            (clear_dag_run, "clear_dag_run", "Clear a DAG run", False),
            (set_dag_run_note, "set_dag_run_note", "Update the DagRun note", False),
            (get_upstream_dataset_events, "get_upstream_dataset_events", "Get dataset events for a DAG run", True),
        ]
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It lacks information on permissions, rate limits, pagination, or what constitutes 'dataset events', making it insufficient for safe and effective use.

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 with no wasted words, making it highly concise and front-loaded. It efficiently conveys the core purpose without unnecessary elaboration.

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 2 parameters with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It fails to explain parameter meanings, behavioral traits, or return values, which are critical for this data retrieval tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but adds no parameter details. It does not explain what 'dag_id' or 'dag_run_id' represent, their formats, or how they relate to dataset events, leaving parameters semantically unclear.

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 target resource ('dataset events for a DAG run'), making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'get_dataset_events' (which lacks the DAG run context), leaving some ambiguity about scope.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites (e.g., needing a valid DAG run), exclusions, or comparisons to siblings like 'get_dataset_events', leaving usage context unclear.

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