Update Event
update_eventUpdate an event's title, dates, location, or description by providing its unique ID.
Instructions
Update event properties.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Event UID | |
| summary | No | New title | |
| startDate | No | New start date/time (ISO 8601, e.g. '2026-03-15T09:00:00Z') | |
| endDate | No | New end date/time (ISO 8601, e.g. '2026-03-15T10:00:00Z') | |
| location | No | New location | |
| description | No | New notes/description |
Implementation Reference
- src/calendar/tools.ts:298-311 (handler)Handler function for update_event tool - receives event id and optional fields (summary, startDate, endDate, location, description), runs automation via Swift or JXA, returns MutationResult.
async ({ id, summary, startDate, endDate, location, description }) => { try { const result = await runAutomation<MutationResult>({ swift: { command: "update-event", input: { id, title: summary, startDate, endDate, location, notes: description }, }, jxa: () => updateEventScript(id, { summary, startDate, endDate, location, description }), }); return ok(result); } catch (e) { return errJxaFor("update event", e); } }, - src/calendar/tools.ts:273-312 (registration)Registration of update_event tool with MCP server, including title, description, input schema (id required, rest optional), and annotations (destructive, idempotent).
server.registerTool( "update_event", { title: "Update Event", description: "Update event properties. Only specified fields are changed. Attendees and recurrence rules cannot be modified via automation.", inputSchema: { id: z.string().max(500).describe("Event UID"), summary: z.string().max(500).optional().describe("New title"), startDate: z .string() .max(64) .optional() .describe("New start date/time (ISO 8601, e.g. '2026-03-15T09:00:00Z')"), endDate: z.string().max(64).optional().describe("New end date/time (ISO 8601, e.g. '2026-03-15T10:00:00Z')"), location: z.string().max(5000).optional().describe("New location"), description: z.string().max(5000).optional().describe("New notes/description"), }, annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false, }, }, async ({ id, summary, startDate, endDate, location, description }) => { try { const result = await runAutomation<MutationResult>({ swift: { command: "update-event", input: { id, title: summary, startDate, endDate, location, notes: description }, }, jxa: () => updateEventScript(id, { summary, startDate, endDate, location, description }), }); return ok(result); } catch (e) { return errJxaFor("update event", e); } }, ); - src/calendar/scripts.ts:173-196 (helper)JXA helper that generates an AppleScript/JXA string to update a calendar event by UID. Finds the event across all calendars, then applies only the provided fields.
export function updateEventScript( id: string, updates: { summary?: string; startDate?: string; endDate?: string; location?: string; description?: string }, ): string { const lines: string[] = []; if (updates.summary !== undefined) lines.push(`ev.summary = '${esc(updates.summary)}';`); if (updates.startDate !== undefined) lines.push(`ev.startDate = new Date('${esc(updates.startDate)}');`); if (updates.endDate !== undefined) lines.push(`ev.endDate = new Date('${esc(updates.endDate)}');`); if (updates.location !== undefined) lines.push(`ev.location = '${esc(updates.location)}';`); if (updates.description !== undefined) lines.push(`ev.description = '${esc(updates.description)}';`); return ` const Calendar = Application('Calendar'); const cals = Calendar.calendars(); let ev = null; for (const cal of cals) { const events = cal.events.whose({uid: '${esc(id)}'})(); if (events.length > 0) { ev = events[0]; break; } } if (!ev) throw new Error('Event not found: ${esc(id)}'); ${lines.join("\n ")} JSON.stringify({id: ev.uid(), summary: ev.summary()}); `; } - src/calendar/tools.ts:279-290 (schema)Input schema for update_event - id required, all other fields optional. Uses Zod validation with max length constraints.
inputSchema: { id: z.string().max(500).describe("Event UID"), summary: z.string().max(500).optional().describe("New title"), startDate: z .string() .max(64) .optional() .describe("New start date/time (ISO 8601, e.g. '2026-03-15T09:00:00Z')"), endDate: z.string().max(64).optional().describe("New end date/time (ISO 8601, e.g. '2026-03-15T10:00:00Z')"), location: z.string().max(5000).optional().describe("New location"), description: z.string().max(5000).optional().describe("New notes/description"), },