get_my_calendars
Retrieve and manage CalDAV calendars from Fastmail and Apple iCloud accounts using the DAV MCP Server, enabling efficient organization and access to your scheduling data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:82-110 (registration)Registration of the tool named `get_my_${DAV_PROVIDER}_calendars` (e.g., get_my_fastmail_calendars or get_my_icloud_calendars), which lists all calendars from the DAV provider. This tool is referred to as 'get_my_calendars' in descriptions and other tool schemas.server.tool( `get_my_${DAV_PROVIDER}_calendars`, { description: `Lists all available calendars from your ${DAV_PROVIDER} account. It returns a list of calendar objects, each containing details like its URL, name, and other properties. Use this to find the \`calendarUrl\` for other calendar-related tools.`, inputSchema: {} }, async () => { if (!davClient) return { content: [{ type: "text", text: "CalDAV client not initialized for this provider."}], isError: true }; try { await davClient.login(); const calendars = await davClient.fetchCalendars(); return { content: [{ type: "text", text: JSON.stringify(calendars, null, 2) }] }; } catch (error) { console.error(`Error in get_my_${DAV_PROVIDER}_calendars:`, error); return { content: [{ type: "text", text: `Error listing calendars: ${JSON.stringify(error.message || error)}` }], isError: true }; } } );
- index.js:88-109 (handler)The handler function for the calendars tool: logs into the CalDAV client, fetches the list of calendars using davClient.fetchCalendars(), and returns them as JSON. Handles errors appropriately.async () => { if (!davClient) return { content: [{ type: "text", text: "CalDAV client not initialized for this provider."}], isError: true }; try { await davClient.login(); const calendars = await davClient.fetchCalendars(); return { content: [{ type: "text", text: JSON.stringify(calendars, null, 2) }] }; } catch (error) { console.error(`Error in get_my_${DAV_PROVIDER}_calendars:`, error); return { content: [{ type: "text", text: `Error listing calendars: ${JSON.stringify(error.message || error)}` }], isError: true }; } }
- index.js:84-87 (schema)Input schema for the tool: empty inputSchema (no parameters required), with a detailed description.{ description: `Lists all available calendars from your ${DAV_PROVIDER} account. It returns a list of calendar objects, each containing details like its URL, name, and other properties. Use this to find the \`calendarUrl\` for other calendar-related tools.`, inputSchema: {} },