Skip to main content
Glama
mumunha

Cal.com Calendar MCP Server

by mumunha

calcom_delete_appointment

Cancel appointments in Cal.com by deleting them using the booking ID. This tool removes scheduled events from your calendar.

Instructions

Deletes an existing appointment from Cal.com calendar. Use this for canceling appointments. Requires booking ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookingIdYesThe Cal.com booking ID to delete
reasonNoOptional reason for cancellation

Implementation Reference

  • Core handler function that executes the deletion logic by calling the Cal.com API DELETE /bookings/{bookingId} endpoint, handles rate limiting, errors, and formats the 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)}`); } }
  • Tool call dispatcher in CallToolRequestSchema handler that validates arguments and invokes the deleteAppointment function.
    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, }; }
  • Type guard function for validating input arguments to the calcom_delete_appointment tool.
    function isCalComDeleteAppointmentArgs(args: unknown): args is { bookingId: number; reason?: string; } { return ( typeof args === "object" && args !== null && "bookingId" in args ); }
  • index.ts:80-100 (registration)
    Tool definition object including name, description, and input schema, used for registration.
    const DELETE_APPOINTMENT_TOOL: Tool = { name: "calcom_delete_appointment", description: "Deletes an existing appointment from Cal.com calendar. " + "Use this for canceling appointments. " + "Requires booking ID. ", 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)
    Registration of all tools including calcom_delete_appointment in the ListToolsRequestSchema handler.
    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