Skip to main content
Glama

deleteCalendarEvent

Remove specific events from Apple Calendar by providing the calendar ID and event ID. Designed for use with the MCP Apple Calendars server to manage macOS calendar data programmatically.

Input Schema

NameRequiredDescriptionDefault
calendarIdYes
eventIdYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "calendarId": { "type": "string" }, "eventId": { "type": "string" } }, "required": [ "calendarId", "eventId" ], "type": "object" }

Implementation Reference

  • Core implementation of deleteCalendarEvent that sends a DELETE request to the Calendar API Bridge endpoint.
    export async function deleteCalendarEvent(calendarId: string, eventId: string): Promise<boolean> { try { await axios.delete(`${API_BASE_URL}/calendars/${calendarId}/events/${eventId}`); return true; } catch (error) { console.error(`Failed to delete event "${eventId}" from calendar "${calendarId}":`, error); throw new Error(`Failed to delete calendar event: ${error}`); } }
  • src/index.ts:236-265 (registration)
    Registers the deleteCalendarEvent MCP tool, defining its schema and providing a wrapper handler that delegates to the core implementation and formats the MCP response.
    server.tool( "deleteCalendarEvent", { calendarId: z.string(), eventId: z.string() }, async ({ calendarId, eventId }) => { try { const success = await calendars.deleteCalendarEvent(calendarId, eventId); return { content: [{ type: "text", text: JSON.stringify({ success, message: success ? "Event deleted" : "Failed to delete event" }) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "Failed to delete event" }) }], isError: true }; } } );
  • Zod input schema requiring calendarId and eventId as strings.
    { calendarId: z.string(), eventId: z.string() },

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