Skip to main content
Glama
by ricleedo

calendar-update-event

Modify existing Google Calendar events by updating details such as title, description, location, time, and attendees to keep your schedule current and accurate.

Instructions

Update an existing calendar event

Input Schema

NameRequiredDescriptionDefault
attendeesNoArray of attendee email addresses
calendarIdNoCalendar ID - Available options: 'primary' (Primary Calendar)primary
descriptionNoEvent description
endDateTimeNoEnd date/time in ISO format
eventIdYesEvent ID
locationNoEvent location
startDateTimeNoStart date/time in ISO format
summaryNoEvent title/summary

Input Schema (JSON Schema)

{ "properties": { "attendees": { "description": "Array of attendee email addresses", "items": { "type": "string" }, "type": "array" }, "calendarId": { "default": "primary", "description": "Calendar ID - Available options: 'primary' (Primary Calendar)", "type": "string" }, "description": { "description": "Event description", "type": "string" }, "endDateTime": { "description": "End date/time in ISO format", "type": "string" }, "eventId": { "description": "Event ID", "type": "string" }, "location": { "description": "Event location", "type": "string" }, "startDateTime": { "description": "Start date/time in ISO format", "type": "string" }, "summary": { "description": "Event title/summary", "type": "string" } }, "required": [ "eventId" ], "type": "object" }

Implementation Reference

  • Core handler function that fetches the existing event, applies the provided updates to fields like summary, description, location, times, and attendees, then calls the Google Calendar API to update it and returns formatted markdown response.
    // Update event function export async function updateEvent( params: z.infer<ReturnType<typeof updateEventSchema>> ) { try { const auth = createCalendarAuth(); const calendar = google.calendar({ version: "v3", auth }); // First get the existing event const existingEvent = await calendar.events.get({ calendarId: params.calendarId, eventId: params.eventId, }); const updatedEvent: any = { ...existingEvent.data }; // Update only the provided fields if (params.summary !== undefined) updatedEvent.summary = params.summary; if (params.description !== undefined) updatedEvent.description = params.description; if (params.location !== undefined) updatedEvent.location = params.location; if (params.startDateTime !== undefined) { updatedEvent.start = { ...updatedEvent.start, dateTime: params.startDateTime, }; } if (params.endDateTime !== undefined) { updatedEvent.end = { ...updatedEvent.end, dateTime: params.endDateTime }; } if (params.attendees !== undefined) { updatedEvent.attendees = params.attendees.map((email) => ({ email })); } const response = await calendar.events.update({ calendarId: params.calendarId, eventId: params.eventId, requestBody: updatedEvent, sendUpdates: "all", }); const updatedEventData = { id: response.data.id, summary: response.data.summary, start: response.data.start, end: response.data.end, location: response.data.location, description: response.data.description, attendees: response.data.attendees, htmlLink: response.data.htmlLink, updated: response.data.updated, }; return { content: [ { type: "text" as const, text: `# Event Updated Successfully βœ…\n\n${formatEventToMarkdown(updatedEventData)}`, }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error updating event: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • Zod schema defining the input parameters for the calendar-update-event tool, including eventId, calendarId, and optional fields to update.
    export const updateEventSchema = () => z.object({ eventId: z.string().describe("Event ID"), calendarId: z .string() .default("primary") .describe(getCalendarDescription()), summary: z.string().optional().describe("Event title/summary"), description: z.string().optional().describe("Event description"), location: z.string().optional().describe("Event location"), startDateTime: z .string() .optional() .describe("Start date/time in ISO format"), endDateTime: z.string().optional().describe("End date/time in ISO format"), attendees: z .array(z.string()) .optional() .describe("Array of attendee email addresses"), });
  • src/index.ts:242-249 (registration)
    Registers the 'calendar-update-event' tool on the MCP server, providing name, description, schema, and handler function.
    server.tool( "calendar-update-event", "Update an existing calendar event", updateEventSchema().shape, async (params) => { return await updateEvent(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