Skip to main content
Glama
shadowfax92

MCP Apple Calendars

by shadowfax92

deleteCalendar

Remove a calendar from Apple Calendar by specifying its calendarId, enabling users to manage their calendar organization through the MCP Apple Calendars server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarIdYes

Implementation Reference

  • src/index.ts:268-296 (registration)
    Registration of the "deleteCalendar" MCP tool, including inline Zod schema for input (calendarId: string) and the handler function that invokes calendars.deleteCalendar and formats the response.
    server.tool(
      "deleteCalendar",
      { 
        calendarId: z.string()
      },
      async ({ calendarId }) => {
        try {
          const success = await calendars.deleteCalendar(calendarId);
          
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify({ 
                success, 
                message: success ? "Calendar deleted" : "Failed to delete calendar" 
              }) 
            }]
          };
        } catch (error) {
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify({ error: "Failed to delete calendar" }) 
            }],
            isError: true
          };
        }
      }
    );
  • Handler function implementing the core logic to delete a calendar by making a DELETE request to the API endpoint.
    export async function deleteCalendar(calendarId: string): Promise<boolean> {
      try {
        await axios.delete(`${API_BASE_URL}/calendars/${calendarId}`);
        return true;
      } catch (error) {
        console.error(`Failed to delete calendar "${calendarId}":`, error);
        throw new Error(`Failed to delete calendar: ${error}`);
      }
    } 

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