Skip to main content
Glama

dag_calendar

View DAG execution schedules and calendar for specified date ranges to monitor workflow timing in Apache Airflow.

Instructions

[Tool Role]: Shows DAG schedule and execution calendar for a date range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
start_dateYes
end_dateYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler implementation for the 'dag_calendar' MCP tool. This function is defined inside register_common_tools(mcp) and uses the @mcp.tool() decorator for automatic registration. It queries the Airflow API for DAG runs in the given date range and returns formatted calendar data including execution dates, states, and run types.
    @mcp.tool()
    async def dag_calendar(dag_id: str, start_date: str, end_date: str) -> Dict[str, Any]:
        """[Tool Role]: Shows DAG schedule and execution calendar for a date range."""
        if not dag_id:
            raise ValueError("dag_id must not be empty")
        
        params = {
            'start_date_gte': start_date,
            'start_date_lte': end_date,
            'limit': 1000
        }
        query_string = "&".join([f"{k}={v}" for k, v in params.items()])
        
        resp = await airflow_request("GET", f"/dags/{dag_id}/dagRuns?{query_string}")
        resp.raise_for_status()
        data = resp.json()
        
        calendar_data = []
        for run in data.get("dag_runs", []):
            calendar_data.append({
                "execution_date": run.get("execution_date"),
                "start_date": run.get("start_date"),
                "end_date": run.get("end_date"),
                "state": run.get("state"),
                "run_type": run.get("run_type")
            })
        
        return {
            "dag_id": dag_id,
            "date_range": {"start": start_date, "end": end_date},
            "calendar_entries": calendar_data,
            "total_runs": len(calendar_data)
        }
Behavior2/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. It states the tool 'Shows' information, implying a read-only operation, but doesn't address permissions, rate limits, output format, or potential side effects. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 highly concise and front-loaded, consisting of a single, efficient sentence that directly states the tool's role. There is no wasted text, making it easy to parse and understand quickly.

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's moderate complexity (3 required parameters) and the presence of an output schema, the description is minimally adequate. However, with no annotations and 0% schema coverage, it lacks details on behavior and parameters. The output schema helps, but the description doesn't fully address gaps in usage and transparency.

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%, meaning parameters are undocumented in the schema. The description only implies 'date range' parameters without detailing 'dag_id', 'start_date', or 'end_date' semantics. It adds minimal value beyond the schema, failing to compensate for the coverage gap, resulting in poor parameter understanding.

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 with a specific verb ('Shows') and resource ('DAG schedule and execution calendar'), making it understandable. It distinguishes itself from siblings like 'dag_graph' or 'dag_run_duration' by focusing on calendar views, though it doesn't explicitly name alternatives. The purpose is not vague or tautological.

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. It mentions a 'date range' context but doesn't specify scenarios, prerequisites, or exclusions. Without explicit when/when-not instructions or named alternatives, users must infer usage from the purpose alone.

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