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 booking ID and new details.

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

  • Core handler function that performs the API call to update the Cal.com appointment with provided changes.
    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)}`); } }
  • Tool dispatcher case within CallToolRequestSchema handler that validates arguments and invokes 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, }; }
  • index.ts:50-78 (registration)
    Defines the Tool metadata including name, description, and input schema for registration.
    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"], } };
  • Input validation type guard for tool 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:379-386 (registration)
    Registers the tool by including it in the ListTools response.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ ADD_APPOINTMENT_TOOL, UPDATE_APPOINTMENT_TOOL, DELETE_APPOINTMENT_TOOL, LIST_APPOINTMENTS_TOOL ], }));

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