Skip to main content
Glama
mumunha

Cal.com Calendar MCP Server

by mumunha

calcom_update_appointment

Modify existing Cal.com appointments by rescheduling times or updating notes using the booking ID.

Instructions

Updates an existing appointment in Cal.com calendar. Use this for rescheduling or modifying existing appointments. Requires booking ID and the fields to update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookingIdYesThe Cal.com booking ID to update
startTimeNoNew start time in ISO format (YYYY-MM-DDTHH:mm:ss.sssZ)
endTimeNoNew end time in ISO format (YYYY-MM-DDTHH:mm:ss.sssZ)
notesNoNew notes for the appointment

Implementation Reference

  • The main handler function that executes the tool logic: validates optional fields, constructs update data, calls Cal.com API PATCH /bookings/{bookingId}, and returns success message or throws error.
    async function updateAppointment( bookingId: number, startTime?: string, endTime?: string, notes?: string ) { checkRateLimit(); try { const updateData: Record<string, any> = {}; if (startTime) updateData.start = new Date(startTime).toISOString(); if (endTime) updateData.end = new Date(endTime).toISOString(); if (notes !== undefined) updateData.notes = notes; const response = await calComApiClient.patch(`/bookings/${bookingId}`, updateData); const booking = response.data; return `Appointment updated successfully! Booking ID: ${booking.id} ${startTime ? `New Start Time: ${booking.startTime}` : ""} ${endTime ? `New End Time: ${booking.endTime}` : ""} ${notes !== undefined ? `New Notes: ${notes}` : ""}`; } catch (error: any) { if (axios.isAxiosError(error)) { throw new Error(`Failed to update appointment: ${error.response?.data?.message || error.message}`); } throw new Error(`Failed to update appointment: ${String(error)}`); } }
  • Type guard function for input schema validation of calcom_update_appointment arguments.
    function isCalComUpdateAppointmentArgs(args: unknown): args is { bookingId: number; startTime?: string; endTime?: string; notes?: string; } { return ( typeof args === "object" && args !== null && "bookingId" in args ); }
  • index.ts:50-78 (registration)
    Tool registration object defining name, description, and JSON inputSchema for calcom_update_appointment.
    const UPDATE_APPOINTMENT_TOOL: Tool = { name: "calcom_update_appointment", description: "Updates an existing appointment in Cal.com calendar. " + "Use this for rescheduling or modifying existing appointments. " + "Requires booking ID and the fields to update. ", inputSchema: { type: "object", properties: { bookingId: { type: "number", description: "The Cal.com booking ID to update" }, startTime: { type: "string", description: "New start time in ISO format (YYYY-MM-DDTHH:mm:ss.sssZ)" }, endTime: { type: "string", description: "New end time in ISO format (YYYY-MM-DDTHH:mm:ss.sssZ)" }, notes: { type: "string", description: "New notes for the appointment" } }, required: ["bookingId"], } };
  • Dispatcher handler case within CallToolRequestSchema that performs arg validation and delegates to the updateAppointment function.
    case "calcom_update_appointment": { if (!isCalComUpdateAppointmentArgs(args)) { throw new Error("Invalid arguments for calcom_update_appointment"); } const { bookingId, startTime, endTime, notes } = args; const result = await updateAppointment(bookingId, startTime, endTime, notes); return { content: [{ type: "text", text: result }], isError: false, }; }

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/mumunha/cal_dot_com_mcpserver'

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