whmcs_delete_ticket
Delete a support ticket from WHMCS by specifying the ticket ID. Use this tool to remove tickets from the system when necessary.
Instructions
Delete a support ticket (use with caution)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketid | Yes | Ticket ID to delete |
Implementation Reference
- src/whmcs-client.ts:770-775 (handler)The main handler function `deleteTicket` in WhmcsApiClient that executes the WHMCS API call to the 'DeleteTicket' action, deleting the specified support ticket.* Delete a ticket */ async deleteTicket(params: { ticketid: number }) { return this.call<WhmcsApiResponse>('DeleteTicket', params); }
- src/index.ts:534-548 (registration)Registers the MCP tool 'whmcs_delete_ticket' with the server, defining its title, description, input schema (requiring ticketid), and a thin async handler that calls whmcsClient.deleteTicket and formats the response.'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:538-540 (schema)Zod input schema for the tool, validating that 'ticketid' is provided as a number.inputSchema: { ticketid: z.number().describe('Ticket ID to delete'), },