Skip to main content
Glama
by ricleedo

calendar-delete-event

Remove calendar events from Google Calendar using event ID to manage your schedule by deleting unwanted or outdated appointments.

Instructions

Delete a calendar event

Input Schema

NameRequiredDescriptionDefault
calendarIdNoCalendar ID - Available options: 'primary' (Primary Calendar)primary
eventIdYesEvent ID

Input Schema (JSON Schema)

{ "properties": { "calendarId": { "default": "primary", "description": "Calendar ID - Available options: 'primary' (Primary Calendar)", "type": "string" }, "eventId": { "description": "Event ID", "type": "string" } }, "required": [ "eventId" ], "type": "object" }

Implementation Reference

  • The main handler function `deleteEvent` that authenticates with Google Calendar API, deletes the specified event, sends updates to attendees, and returns a formatted success or error message.
    export async function deleteEvent( params: z.infer<ReturnType<typeof deleteEventSchema>> ) { try { const auth = createCalendarAuth(); const calendar = google.calendar({ version: "v3", auth }); await calendar.events.delete({ calendarId: params.calendarId, eventId: params.eventId, sendUpdates: "all", }); return { content: [ { type: "text" as const, text: `# Event Deleted Successfully βœ…\n\nEvent \`${params.eventId}\` has been deleted from your calendar.`, }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error deleting event: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • Zod input schema for the delete event tool, requiring `eventId` and optional `calendarId` (defaults to 'primary') with dynamic description.
    export const deleteEventSchema = () => z.object({ eventId: z.string().describe("Event ID"), calendarId: z .string() .default("primary") .describe(getCalendarDescription()), });
  • src/index.ts:252-258 (registration)
    MCP server tool registration for 'calendar-delete-event', providing description, schema from deleteEventSchema, and handler wrapper calling deleteEvent.
    "calendar-delete-event", "Delete a calendar event", deleteEventSchema().shape, async (params) => { return await deleteEvent(params); } );

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/ricleedo/Google-Service-MCP'

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