delete_appointment
Delete an appointment from your healthcare practice management system by providing the appointment ID.
Instructions
Delete an appointment completely
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appointment_id | Yes | Appointment ID |
Implementation Reference
- src/tools/appointments.ts:174-196 (registration)Registration of the 'delete_appointment' MCP tool with its input schema (appointment_id required) and handler that calls client.deleteAppointment
// Delete appointment server.tool('delete_appointment', { description: 'Delete an appointment completely', inputSchema: { type: 'object', properties: { appointment_id: { type: 'number', description: 'Appointment ID' } }, required: ['appointment_id'] }, }, async ({ appointment_id }: { appointment_id: number }) => { try { await client.deleteAppointment(appointment_id); return { content: [{ type: 'text', text: `Appointment ${appointment_id} has been deleted successfully` }] }; } catch (error) { throw new Error(`Failed to delete appointment: ${error instanceof Error ? error.message : 'Unknown error'}`); } }); - src/tools/appointments.ts:184-196 (handler)Handler function for delete_appointment: extracts appointment_id, calls client.deleteAppointment, returns success message, or throws on error
}, async ({ appointment_id }: { appointment_id: number }) => { try { await client.deleteAppointment(appointment_id); return { content: [{ type: 'text', text: `Appointment ${appointment_id} has been deleted successfully` }] }; } catch (error) { throw new Error(`Failed to delete appointment: ${error instanceof Error ? error.message : 'Unknown error'}`); } }); - src/tools/appointments.ts:177-183 (schema)Input schema for delete_appointment: expects a single required 'appointment_id' parameter of type number
inputSchema: { type: 'object', properties: { appointment_id: { type: 'number', description: 'Appointment ID' } }, required: ['appointment_id'] }, - src/cliniko-client.ts:142-146 (helper)ClinikoClient.deleteAppointment: makes a DELETE request to /appointments/{id} and handles 204 No Content response
async deleteAppointment(id: number): Promise<void> { return this.request<void>(`/appointments/${id}`, { method: 'DELETE', }); } - src/index.ts:59-59 (registration)Tool registration entry point in index.ts: calls registerAppointmentTools to register all appointment tools including delete_appointment
registerAppointmentTools(toolRegistry, clinikoClient);