list_calendars
Retrieve all calendars from iCloud Calendar, including calendar IDs, names, and supported event types for organization and management.
Instructions
List all calendars in iCloud Calendar (e.g. Personal, Work, LSAT PREP). Returns calendarId, name, and supported event types.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- lib/caldav.js:333-351 (handler)The function listCalendars performs a PROPFIND request to the calendar home set to discover available calendars.
export async function listCalendars() { const { dataHost, calendarsPath } = await discover(); const body = propfindBody(` <A:resourcetype/> <A:displayname/> <A:sync-token/> <C:supported-calendar-component-set xmlns:C="urn:ietf:params:xml:ns:caldav"/> `); const resp = await davRequest('PROPFIND', `${dataHost}${calendarsPath}`, { depth: 1, contentType: 'application/xml; charset=utf-8', body, }); const calendars = parseCalendarBlocks(resp.body); return { calendars, count: calendars.length }; }