Delete Ticket
whmcs_delete_ticketPermanently delete a WHMCS support ticket using its ticket ID. Exercise caution; this action is irreversible.
Instructions
Delete a support ticket (use with caution)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketid | Yes | Ticket ID to delete |
Implementation Reference
- src/index.ts:552-567 (registration)Registration of the 'whmcs_delete_ticket' tool via server.registerTool, defining its name, title, description, input schema (ticketid required), and handler that calls whmcsClient.deleteTicket()
server.registerTool( 'whmcs_delete_ticket', { title: 'Delete Ticket', description: 'Delete a support ticket (use with caution)', inputSchema: { ticketid: z.number().describe('Ticket ID to delete'), }, }, async (params) => { const result = await whmcsClient.deleteTicket(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/index.ts:556-560 (schema)Input schema for whmcs_delete_ticket: requires 'ticketid' (number) describing the ticket ID to delete
description: 'Delete a support ticket (use with caution)', inputSchema: { ticketid: z.number().describe('Ticket ID to delete'), }, }, - src/index.ts:561-566 (handler)Handler function for whmcs_delete_ticket that calls whmcsClient.deleteTicket(params) and returns JSON-stringified result
async (params) => { const result = await whmcsClient.deleteTicket(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } - src/whmcs-client.ts:782-787 (helper)The deleteTicket method on WhmcsApiClient: makes an API call to WHMCS's 'DeleteTicket' action with the ticketid parameter
/** * Delete a ticket */ async deleteTicket(params: { ticketid: number }) { return this.call<WhmcsApiResponse>('DeleteTicket', params); }