Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Calendar

Endpoint /calendar (or calendar_<tool> under /mcp). The calendar service reads and edits your iCloud calendars over CalDAV.

Tools

ToolKindWhat it doesKey parameters
list_calendarsreadCalendars that hold events: id, name, colour and whether they can be writtennone
list_eventsreadEvent occurrences in a range, recurring events expanded, sorted by start. At most 500 occurrences; truncated is true when more existstart (default today at 00:00), end (default 7 days after start, at most 366 days after it), calendars, query, needs_response, timezone
get_eventreadOne event in full: description, recurrence (in words and as RRULE), excluded occurrences, attendees, organizer, alerts, URLevent_id, occurrence_start, timezone
find_free_timereadFree slots of at least duration_minutes, optionally inside working hours. Events marked free, cancelled events and invitations you declined are not busystart, end, duration_minutes (1 to 10080), calendars, working_hours (start, end as HH:MM, days), timezone
get_timezonereadThe active time zone, where it comes from, and the configured defaultnone
set_timezonewriteSet the active time zone for later calls, for example while you travel; null returns to the default. Kept in memory until a restartzone
create_eventwriteCreate a timed or all-day event, optionally recurring, with alerts and (when allowed) attendeescalendar, summary, start and end, or start_date and end_date (inclusive), location, description, timezone, recurrence, alerts_minutes_before, attendees
update_eventwriteChange only the fields you pass, for the whole series, one occurrence, or this and following occurrencesevent_id, scope (series, occurrence, this_and_following), occurrence_start, and any field of create_event
delete_eventwriteDelete the series, one occurrence, or this and following occurrencesevent_id, scope, occurrence_start
create_calendarwriteCreate a calendar for events. The name must differ from every calendar’s name, ignoring case. Returns the calendar as list_calendars shows itname, color (#RRGGBB)
rename_calendarwriteRename a calendar, change its colour, or both. The new name must not be another calendar’s name, ignoring case. Read-only calendars are refusedcalendar, new_name, color (#RRGGBB; give at least one of the two)
delete_calendarwriteDelete an empty calendar. Refused while it holds any event or other item, and for the only writable calendar. The emptiness check and the delete are two requests, so an event added in between is deleted with itcalendar
respond_to_invitationwriteAccept, decline or tentatively accept an invitation; iCloud sends the reply to the organizer. Registered only with ICLOUD_ALLOW_INVITES=trueevent_id, response (accepted, declined, tentative), occurrence_start

Prompts

Prompts are ready-made requests a client can offer you. They tell the model which tools to call and in what order; they change nothing by themselves.

PromptArgumentsWhat it does
plan_weekstart (YYYY-MM-DD, default today in the active time zone)Lays out the seven days from start, points out overlapping and back-to-back events, lists invitations waiting for your reply and suggests free slots with find_free_time. Replies to an invitation only with the answer you give

Arguments are text; a blank argument takes its default, and an invalid one (a start that is not a YYYY-MM-DD date) is refused. Replying to invitations needs ICLOUD_ALLOW_INVITES=true; without it the model is told to say so and skip that step.

Addressing events

Events are addressed by event_id as list_events returns it. One occurrence of a recurring event is additionally addressed by occurrence_start, exactly as list_events returns it. Every change is a conditional write: if the event changed in iCloud since it was read, the tool returns a conflict error instead of overwriting it.

Managing calendars

  • create_calendar makes a calendar that holds events (not reminders) under a new id in your calendar home. Colours are given as #RRGGBB; iCloud stores them with an alpha channel, so list_calendars shows them as #RRGGBBFF.
  • Calendar names are compared ignoring case: create_calendar and rename_calendar return a conflict error for a name another calendar already has. Changing only the case of a calendar’s own name is allowed.
  • Read-only calendars, such as subscribed or read-only shared calendars, cannot be renamed or deleted (read_only).
  • delete_calendar only deletes an empty calendar: it first lists what the calendar holds and returns a validation error while it holds any event, reminder or other item. It also refuses to delete your only writable calendar.
  • The emptiness check and the delete are two separate requests to iCloud. An event added to the calendar between them, for example from your phone, is deleted together with the calendar.

Recurrence and alerts

  • recurrence takes freq (daily, weekly, monthly, yearly), interval, by_day (MO to SU, with an ordinal such as 2TU or -1FR for monthly and yearly), by_month_day (1 to 31 or -1), and either until or count.
  • alerts_minutes_before sets alerts in minutes before the start (0 to 40320). On update_event it replaces all alerts, and [] removes them.

Time zones

  • Times are shown in the active zone, plus the event’s own zone when it differs. Times you pass without an offset are read in the active zone; times with an offset are used as given. All-day events are dates and never shift.
  • The active zone is CALENDAR_TIMEZONE (default Europe/London) unless overridden with set_timezone. The override lives in memory: a restart returns to CALENDAR_TIMEZONE.
  • Every time-based tool also takes timezone for one call.
  • A local time that does not exist (skipped by a daylight saving change) is rejected; an ambiguous one (a repeated hour) uses the earlier time.

Invitations

With ICLOUD_ALLOW_INVITES=false (the default), attendees are always shown and preserved, but the server will not change them: attendee arguments are refused, respond_to_invitation is not registered, and events you organize that have attendees, and invitations from others (apart from your own alerts), cannot be changed or deleted, because iCloud would email the attendees.

With ICLOUD_ALLOW_INVITES=true, adding or removing attendees makes iCloud send invitations or cancellations, and respond_to_invitation sends your reply to the organizer.

iCloud notes

  • Reminders lists are not available: Apple no longer serves upgraded iCloud Reminders over CalDAV, so only event calendars appear.
  • iCloud adds its own time zone definitions to stored events.
  • Your credentials are only sent to https hosts under icloud.com (or the exact CALDAV_URL host when overridden); redirects elsewhere are refused.