calcom_delete_appointment
Cancel appointments in Cal.com by deleting them using the booking ID. This tool removes scheduled events from the calendar.
Instructions
Deletes an existing appointment from Cal.com calendar. Use this for canceling appointments. Requires booking ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bookingId | Yes | The Cal.com booking ID to delete | |
| reason | No | Optional reason for cancellation |
Implementation Reference
- index.ts:326-342 (handler)Core handler function that performs the API DELETE request to Cal.com to cancel the appointment by bookingId, handles rate limiting, errors, and formats success response.async function deleteAppointment(bookingId: number, reason?: string) { checkRateLimit(); try { await calComApiClient.delete(`/bookings/${bookingId}`, { data: reason ? { reason } : undefined }); return `Appointment deleted successfully! Booking ID: ${bookingId} ${reason ? `Reason: ${reason}` : ""}`; } catch (error: any) { if (axios.isAxiosError(error)) { throw new Error(`Failed to delete appointment: ${error.response?.data?.message || error.message}`); } throw new Error(`Failed to delete appointment: ${String(error)}`); } }
- index.ts:421-430 (handler)MCP CallToolRequest dispatch case that validates args and invokes the deleteAppointment handler.case "calcom_delete_appointment": { if (!isCalComDeleteAppointmentArgs(args)) { throw new Error("Invalid arguments for calcom_delete_appointment"); } const { bookingId, reason } = args; const result = await deleteAppointment(bookingId, reason); return { content: [{ type: "text", text: result }], isError: false, };
- index.ts:236-245 (schema)Runtime type guard validating tool input arguments against schema.function isCalComDeleteAppointmentArgs(args: unknown): args is { bookingId: number; reason?: string; } { return ( typeof args === "object" && args !== null && "bookingId" in args ); }
- index.ts:86-99 (schema)JSON Schema defining the tool's input parameters (bookingId required, reason optional).inputSchema: { type: "object", properties: { bookingId: { type: "number", description: "The Cal.com booking ID to delete" }, reason: { type: "string", description: "Optional reason for cancellation" } }, required: ["bookingId"], }
- index.ts:379-386 (registration)Registers the calcom_delete_appointment tool by including DELETE_APPOINTMENT_TOOL in the ListTools response.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ ADD_APPOINTMENT_TOOL, UPDATE_APPOINTMENT_TOOL, DELETE_APPOINTMENT_TOOL, LIST_APPOINTMENTS_TOOL ], }));