Skip to main content
Glama

check_availability

Verify calendar availability for scheduling meetings by providing account ID, start and end times, and optional attendees, powered by Microsoft MCP server.

Instructions

Check calendar availability for scheduling

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
attendeesNo
endYes
startYes

Implementation Reference

  • The core handler function implementing the check_availability tool. It uses the Microsoft Graph API to query calendar availability for the account and optional attendees within the specified time range.
    @mcp.tool def check_availability( account_id: str, start: str, end: str, attendees: str | list[str] | None = None, ) -> dict[str, Any]: """Check calendar availability for scheduling""" me_info = graph.request("GET", "/me", account_id) if not me_info or "mail" not in me_info: raise ValueError("Failed to get user email address") schedules = [me_info["mail"]] if attendees: attendees_list = [attendees] if isinstance(attendees, str) else attendees schedules.extend(attendees_list) payload = { "schedules": schedules, "startTime": {"dateTime": start, "timeZone": "UTC"}, "endTime": {"dateTime": end, "timeZone": "UTC"}, "availabilityViewInterval": 30, } result = graph.request("POST", "/me/calendar/getSchedule", account_id, json=payload) if not result: raise ValueError("Failed to check availability") return result

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