Skip to main content
Glama

getCalendars

Retrieve Apple Calendar data on macOS via MCP Apple Calendars. Enables AI models to access and manage calendar entries through a standardized interface.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • MCP server.tool registration and handler implementation for the 'getCalendars' tool. It calls calendars.getCalendars() and returns the result as JSON text content, handling errors.
    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 }; } } );
  • Helper function that performs the actual API call to retrieve calendars from the local Calendar API Bridge server.
    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}`); } }

Other Tools

Related Tools

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