Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

get_dataset_events

Retrieve dataset events from Apache Airflow to monitor data dependencies and track pipeline triggers using filtering and pagination options.

Instructions

Get dataset events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
order_byNo
dataset_idNo
source_dag_idNo
source_task_idNo
source_run_idNo
source_map_indexNo

Implementation Reference

  • The handler function that implements the core logic of the 'get_dataset_events' tool by collecting optional parameters into kwargs and calling the Airflow DatasetApi.get_dataset_events method, then returning the response as TextContent.
    async def get_dataset_events(
        limit: Optional[int] = None,
        offset: Optional[int] = None,
        order_by: Optional[str] = None,
        dataset_id: Optional[int] = None,
        source_dag_id: Optional[str] = None,
        source_task_id: Optional[str] = None,
        source_run_id: Optional[str] = None,
        source_map_index: Optional[int] = 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 dataset_id is not None:
            kwargs["dataset_id"] = dataset_id
        if source_dag_id is not None:
            kwargs["source_dag_id"] = source_dag_id
        if source_task_id is not None:
            kwargs["source_task_id"] = source_task_id
        if source_run_id is not None:
            kwargs["source_run_id"] = source_run_id
        if source_map_index is not None:
            kwargs["source_map_index"] = source_map_index
    
        response = dataset_api.get_dataset_events(**kwargs)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The get_all_functions() defines the registration tuple for 'get_dataset_events' among other dataset tools: (get_dataset_events, "get_dataset_events", "Get dataset events", True). This list is imported and used in main.py to register the tools with the 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_datasets, "get_datasets", "List datasets", True),
            (get_dataset, "get_dataset", "Get a dataset by URI", True),
            (get_dataset_events, "get_dataset_events", "Get dataset events", True),
            (create_dataset_event, "create_dataset_event", "Create dataset event", False),
            (get_dag_dataset_queued_event, "get_dag_dataset_queued_event", "Get a queued Dataset event for a DAG", True),
            (get_dag_dataset_queued_events, "get_dag_dataset_queued_events", "Get queued Dataset events for a DAG", True),
            (
                delete_dag_dataset_queued_event,
                "delete_dag_dataset_queued_event",
                "Delete a queued Dataset event for a DAG",
                False,
            ),
            (
                delete_dag_dataset_queued_events,
                "delete_dag_dataset_queued_events",
                "Delete queued Dataset events for a DAG",
                False,
            ),
            (get_dataset_queued_events, "get_dataset_queued_events", "Get queued Dataset events for a Dataset", True),
            (
                delete_dataset_queued_events,
                "delete_dataset_queued_events",
                "Delete queued Dataset events for a Dataset",
                False,
            ),
        ]
  • src/main.py:87-92 (registration)
    The generic registration loop in main.py that calls app.add_tool for each function from get_dataset_functions(), including get_dataset_events, effectively registering it as an MCP tool.
    if read_only:
        functions = filter_functions_for_read_only(functions)
    
    for func, name, description, *_ in functions:
        app.add_tool(func, name=name, description=description)
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get dataset events' gives no information about whether this is a read-only operation, what permissions are required, whether it's paginated, what format the results come in, or any rate limits. For a tool with 8 parameters and no output schema, this leaves the agent completely in the dark about behavioral characteristics.

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

Conciseness3/5

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

The description is extremely concise (three words) but this is under-specification rather than effective brevity. While it's front-loaded with the core action, every sentence should earn its place, and this single phrase doesn't earn its place by providing sufficient value. It's structured as a simple verb-noun phrase but lacks the substance needed for a tool of this complexity.

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?

For a tool with 8 parameters, no annotations, no output schema, and multiple similar sibling tools, the description is completely inadequate. It doesn't explain what the tool returns, how to interpret parameters, when to use it versus alternatives, or any behavioral characteristics. The agent would struggle to use this tool correctly given the minimal information provided.

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?

With 8 parameters and 0% schema description coverage, the description provides absolutely no information about any parameters. It doesn't mention that parameters like dataset_id, source_dag_id, or order_by exist, let alone explain what they mean or how they affect the results. The description fails to compensate for the complete lack of parameter documentation in the schema.

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

Purpose2/5

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

The description 'Get dataset events' is a tautology that restates the tool name without adding meaningful information. It doesn't specify what 'get' means (list, retrieve, fetch?), what 'dataset events' are, or how this differs from sibling tools like 'get_dataset_queued_events' or 'get_upstream_dataset_events'. While it identifies the resource (dataset events), the verb is generic and lacks specificity.

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

Usage Guidelines1/5

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

The description provides zero guidance on when to use this tool versus alternatives. There are multiple related tools in the sibling list (get_dataset_queued_events, get_upstream_dataset_events, get_event_logs) with no indication of how this tool differs or when it's appropriate. No context about prerequisites, typical use cases, or exclusions is mentioned.

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/nikhil-ganage/mcp-server-airflow-token'

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