list_calendars
Retrieve all calendars from a Fastmail account to identify and access specific calendars for managing events.
Instructions
STEP 1 - ALWAYS CALL THIS FIRST. Lists all calendars in the user's Fastmail account. Returns an array of calendars with displayName (human-readable name like "Work", "Personal", "Family"), url (required for other operations), and timezone. You MUST call this before list_events, create_event, update_event, or delete_event to get the calendar URL. Look at the displayName to identify which calendar the user wants (e.g., "Work" for work schedule, "Personal" for personal events).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:428-459 (handler)The execution handler for the list_calendars tool. It checks if in test mode and returns mock calendars, otherwise maps the fetched calendars to a simple object with displayName, url, description, timezone and returns as JSON text.case "list_calendars": { if (isTestMode) { return { content: [ { type: "text", text: JSON.stringify({ _testMode: true, _message: "Demo mode - showing sample calendars. Use real Fastmail credentials for actual data.", calendars: MOCK_CALENDARS, }, null, 2), }, ], }; } const calendarList = calendars.map((cal) => ({ displayName: cal.displayName, url: cal.url, description: cal.description || "", timezone: cal.timezone || "", })); return { content: [ { type: "text", text: JSON.stringify(calendarList, null, 2), }, ], }; }
- src/index.ts:245-260 (registration)The tool registration entry in the list of tools returned by ListToolsRequestSchema, including name, description, input schema (no parameters), and annotations indicating it's read-only and idempotent.{ name: "list_calendars", description: `STEP 1 - ALWAYS CALL THIS FIRST. Lists all calendars in the user's Fastmail account. Returns an array of calendars with displayName (human-readable name like "Work", "Personal", "Family"), url (required for other operations), and timezone. You MUST call this before list_events, create_event, update_event, or delete_event to get the calendar URL. Look at the displayName to identify which calendar the user wants (e.g., "Work" for work schedule, "Personal" for personal events).`, inputSchema: { type: "object", properties: {}, required: [], }, annotations: { title: "List Calendars", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, },
- src/index.ts:248-252 (schema)The input schema definition for the list_calendars tool, specifying an empty object with no required properties.inputSchema: { type: "object", properties: {}, required: [], },
- src/index.ts:28-47 (helper)Mock calendar data used by the list_calendars handler in test/demo mode.const MOCK_CALENDARS = [ { displayName: "Personal", url: "https://caldav.fastmail.com/dav/calendars/user/demo@fastmail.com/personal/", description: "Personal calendar for everyday events", timezone: "America/New_York", }, { displayName: "Work", url: "https://caldav.fastmail.com/dav/calendars/user/demo@fastmail.com/work/", description: "Work meetings and deadlines", timezone: "America/New_York", }, { displayName: "Family", url: "https://caldav.fastmail.com/dav/calendars/user/demo@fastmail.com/family/", description: "Family events and activities", timezone: "America/New_York", }, ];