Skip to main content
Glama

getCalendars

Retrieve and list available Apple Calendar calendars on macOS through the MCP server interface for accessing calendar data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'getCalendars': calls the calendars.getCalendars() helper, formats response as MCP content with error handling.
    server.tool( "getCalendars", {}, async () => { try { const calendarList = await calendars.getCalendars(); return { content: [{ type: "text", text: JSON.stringify({ calendars: calendarList }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "Failed to get calendars" }) }], isError: true }; } } );
  • Core helper function that performs the HTTP GET request to the Calendar API Bridge endpoint `/calendars` to retrieve all calendars.
    * Get all calendars */ export async function getCalendars(): Promise<any[]> { try { const response = await axios.get(`${API_BASE_URL}/calendars`); return response.data; } catch (error) { console.error('Failed to get calendars:', error); throw new Error(`Failed to get calendars: ${error}`); } }
  • Empty Zod schema indicating 'getCalendars' tool takes no input parameters.
    {},
  • src/index.ts:15-15 (registration)
    Registration of the 'getCalendars' tool using McpServer.tool() method.
    server.tool(

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/shadowfax92/apple-calendar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server