Skip to main content
Glama

list_events

Retrieve and display calendar events within a specified date range, including recurring instances, using the Microsoft MCP server. Ideal for managing and organizing Outlook schedules efficiently.

Instructions

List calendar events within specified date range, including recurring event instances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
days_aheadNo
days_backNo
include_detailsNo

Implementation Reference

  • The handler function for the 'list_events' tool. It queries the Microsoft Graph API's /me/calendarView endpoint to list calendar events within a specified date range, handling recurring events, with options for date range and detail level.
    @mcp.tool
    def list_events(
        account_id: str,
        days_ahead: int = 7,
        days_back: int = 0,
        include_details: bool = True,
    ) -> list[dict[str, Any]]:
        """List calendar events within specified date range, including recurring event instances"""
        now = dt.datetime.now(dt.timezone.utc)
        start = (now - dt.timedelta(days=days_back)).isoformat()
        end = (now + dt.timedelta(days=days_ahead)).isoformat()
    
        params = {
            "startDateTime": start,
            "endDateTime": end,
            "$orderby": "start/dateTime",
            "$top": 100,
        }
    
        if include_details:
            params["$select"] = (
                "id,subject,start,end,location,body,attendees,organizer,isAllDay,recurrence,onlineMeeting,seriesMasterId"
            )
        else:
            params["$select"] = "id,subject,start,end,location,organizer,seriesMasterId"
    
        # Use calendarView to get recurring event instances
        events = list(
            graph.request_paginated("/me/calendarView", account_id, params=params)
        )
    
        return events
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. While it mentions date range filtering and inclusion of recurring event instances, it doesn't address important behavioral aspects like pagination, rate limits, authentication requirements, error conditions, or what happens when no events match the criteria.

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 extremely concise with a single sentence that efficiently communicates the core functionality. Every word earns its place, and the structure is front-loaded with the essential information about listing events with date range filtering.

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?

For a tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is insufficient. It doesn't explain parameter usage, return format, error handling, or behavioral constraints. The mention of recurring event instances is helpful but doesn't compensate for the significant documentation gaps.

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?

With 0% schema description coverage and 4 parameters, the description provides no information about any parameters. It mentions 'specified date range' which relates to days_ahead/days_back, but doesn't explain these parameters or account_id and include_details. The description fails to compensate for the complete lack of schema 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: 'List calendar events within specified date range, including recurring event instances.' It specifies the verb ('List'), resource ('calendar events'), and scope ('within specified date range'), but doesn't explicitly differentiate from sibling tools like 'search_events' or 'get_event'.

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 like 'search_events' or 'get_event'. It mentions date range filtering but doesn't explain when this specific listing approach is preferred over search functionality or single-event retrieval.

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

Related 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/elyxlz/microsoft-mcp'

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