Skip to main content
Glama

google_calendar_delete_event

Remove an event from Google Calendar by specifying its event ID. Optionally, define the calendar ID or use the primary calendar by default.

Instructions

Delete an event from Google Calendar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarIdNoOptional: ID of calendar to use (defaults to primary if not specified)
eventIdYesID of the event to delete

Implementation Reference

  • The handler function that executes the tool: validates input using isDeleteEventArgs, extracts eventId and calendarId, calls deleteEvent on GoogleCalendar instance, and returns success response.
    export async function handleCalendarDeleteEvent( args: any, googleCalendarInstance: GoogleCalendar ) { if (!isDeleteEventArgs(args)) { throw new Error("Invalid arguments for google_calendar_delete_event"); } const { eventId, calendarId } = args; const result = await googleCalendarInstance.deleteEvent(eventId, calendarId); return { content: [{ type: "text", text: result }], isError: false, }; }
  • Tool schema definition: name, description, and inputSchema for google_calendar_delete_event.
    export const DELETE_EVENT_TOOL: Tool = { name: "google_calendar_delete_event", description: "Delete an event from Google Calendar", inputSchema: { type: "object", properties: { eventId: { type: "string", description: "ID of the event to delete", }, calendarId: { type: "string", description: "Optional: ID of calendar to use (defaults to primary if not specified)", }, }, required: ["eventId"], }, };
  • Registration in the server request handler switch statement: routes CallToolRequest for this tool to the handler.
    case "google_calendar_delete_event": return await calendarHandlers.handleCalendarDeleteEvent( args, googleCalendarInstance );
  • Helper validation function (type guard) used in the handler to validate arguments match the schema.
    export function isDeleteEventArgs(args: any): args is { eventId: string; calendarId?: string; } { return ( args && typeof args.eventId === "string" && (args.calendarId === undefined || typeof args.calendarId === "string") ); }

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/vakharwalad23/google-mcp'

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