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 the 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 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)}`); } }
  • 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, };
  • 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 ); }
  • 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 ], }));

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