Skip to main content
Glama

list_dataset_events

Retrieve dataset events for data lineage tracking in Apache Airflow, enabling monitoring of data dependencies and pipeline relationships.

Instructions

[Tool Role]: Lists dataset events for data lineage tracking (v1 API only - v2 uses Assets).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
dataset_uriNo
source_dag_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_dataset_events' tool, decorated with @mcp.tool() which registers it in the MCP server. It handles pagination, filtering by dataset_uri or source_dag_id, checks API version, and queries the Airflow datasets/events endpoint.
    @mcp.tool()
    async def list_dataset_events(limit: int = 20, offset: int = 0, 
                                 dataset_uri: Optional[str] = None,
                                 source_dag_id: Optional[str] = None) -> Dict[str, Any]:
        """[Tool Role]: Lists dataset events for data lineage tracking (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"
            }
        
        params = []
        params.append(f"limit={limit}")
        if offset > 0:
            params.append(f"offset={offset}")
        if dataset_uri:
            params.append(f"dataset_uri={dataset_uri}")
        if source_dag_id:
            params.append(f"source_dag_id={source_dag_id}")
        
        query_string = "&".join(params) if params else ""
        endpoint = f"/datasets/events?{query_string}" if query_string else "/datasets/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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the API version constraint but doesn't describe what 'dataset events' actually are, the format of returned data, pagination behavior (though parameters suggest it), authentication requirements, rate limits, or whether this is a read-only operation. The description adds minimal behavioral context beyond the basic purpose.

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 appropriately concise with just one sentence that efficiently communicates the core purpose and a key constraint. It's front-loaded with the main functionality. The bracketed '[Tool Role]:' prefix is slightly redundant but doesn't significantly detract from efficiency.

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 the tool has an output schema (which should document return values), the description's job is reduced. However, with no annotations and 0% schema description coverage for 4 parameters, the description should do more to explain parameter usage and behavioral context. The API version warning is helpful, but overall completeness is mediocre for a list/filter tool with multiple parameters.

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 schema provides no parameter documentation. The description doesn't mention any parameters or their semantics. It doesn't explain what 'dataset_uri' or 'source_dag_id' mean, how 'limit' and 'offset' work for pagination, or the purpose of filtering. With 4 undocumented parameters, the description fails to compensate for the schema's lack of documentation.

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: 'Lists dataset events for data lineage tracking'. It specifies the verb ('Lists'), resource ('dataset events'), and domain context ('data lineage tracking'). However, it doesn't explicitly differentiate from sibling tools like 'get_dataset_events' or 'list_datasets', which would be needed for a perfect score.

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 provides some usage context with the note '(v1 API only - v2 uses Assets)', which implies when NOT to use this tool (i.e., for v2 API scenarios). However, it doesn't explicitly state when to use this tool versus alternatives like 'get_dataset_events' or 'list_datasets', nor does it provide clear prerequisites or exclusions beyond the API version note.

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