Skip to main content
Glama
ricleedo
by ricleedo

calendar-delete-event

Remove calendar events from Google Calendar by specifying the event ID. This tool helps manage your schedule by deleting unwanted or outdated appointments.

Instructions

Delete a calendar event

Input Schema

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

Implementation Reference

  • src/index.ts:251-258 (registration)
    Registration of the 'calendar-delete-event' tool, linking to deleteEvent handler and deleteEventSchema.
    server.tool( "calendar-delete-event", "Delete a calendar event", deleteEventSchema().shape, async (params) => { return await deleteEvent(params); } );
  • Zod schema defining input parameters for deleting a calendar event: eventId and optional calendarId.
    export const deleteEventSchema = () => z.object({ eventId: z.string().describe("Event ID"), calendarId: z .string() .default("primary") .describe(getCalendarDescription()), });
  • Implementation of the deleteEvent handler: authenticates with Google Calendar API, deletes the specified event, and returns success or error message.
    // Delete event function 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) }`, }, ], }; } }

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