Skip to main content
Glama

get_dataset_events

Retrieve events for a specific dataset in Apache Airflow using the v1 API to monitor dataset activity and track changes.

Instructions

[Tool Role]: Gets events for a specific dataset (v1 API only - v2 uses Assets).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_uriYes
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_dataset_events tool handler function, decorated with @mcp.tool() for automatic registration in the MCP server. It fetches events for the specified dataset URI using the Airflow API (v1 only, with fallback message for v2). Parameters: dataset_uri (str), limit (int=20), offset (int=0). Returns dict of events.
    @mcp.tool()
    async def get_dataset_events(dataset_uri: str, limit: int = 20, offset: int = 0) -> Dict[str, Any]:
        """[Tool Role]: Gets events for a specific dataset (v1 API only - v2 uses Assets)."""
        from ..functions import get_api_version
        
        api_version = get_api_version()
        if api_version == "v2":
            return {
                "error": "Dataset events API is not available in Airflow 3.x (API v2)", 
                "available_in": "v1 only",
                "v2_alternative": "Use list_asset_events() for Airflow 3.x data lineage tracking"
            }
        
        import urllib.parse
        encoded_uri = urllib.parse.quote(dataset_uri, safe='')
        
        params = []
        params.append(f"limit={limit}")
        if offset > 0:
            params.append(f"offset={offset}")
        
        query_string = "&".join(params) if params else ""
        endpoint = f"/datasets/{encoded_uri}/events?{query_string}" if query_string else f"/datasets/{encoded_uri}/events"
        
        resp = await airflow_request("GET", endpoint)
        resp.raise_for_status()
        return resp.json()
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions API version constraints (v1 only) but fails to disclose key behavioral traits: whether this is a read-only operation, if it requires specific permissions, pagination behavior (implied by limit/offset but not explained), rate limits, or error handling. The description adds minimal context beyond the basic action.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core purpose. The API version note is relevant but could be integrated more smoothly. No wasted words, though it could benefit from slight restructuring for clarity (e.g., separating purpose from constraints).

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

Completeness3/5

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

Given complexity (dataset event retrieval), no annotations, and an output schema (which handles return values), the description is minimally complete. It covers the tool's role and API version but misses behavioral details (safety, pagination) and parameter guidance. With output schema reducing burden, it's adequate but has clear gaps for effective agent use.

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. It adds no parameter semantics beyond what the schema titles imply—no explanation of 'dataset_uri' format, 'limit' bounds, or 'offset' usage. For 3 parameters with zero schema coverage, this is inadequate; the description should clarify parameter roles and constraints.

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 tool's purpose: 'Gets events for a specific dataset' (verb+resource). It distinguishes from siblings like 'list_dataset_events' by specifying retrieval for a single dataset, but doesn't fully differentiate from 'get_event_log' or other event-related tools. The mention of 'v1 API only - v2 uses Assets' adds technical context but doesn't refine the core purpose.

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

Usage Guidelines3/5

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

The description implies usage for dataset events in v1 API contexts, with an implicit alternative (v2 Assets). However, it lacks explicit guidance on when to use this vs. siblings like 'list_dataset_events' (bulk retrieval) or 'get_event_log' (general events). No exclusions or prerequisites are stated, leaving usage context partially 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/call518/MCP-Airflow-API'

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