Delete Order
whmcs_delete_orderDelete a WHMCS order by providing its numeric order ID. This action is permanent; use only when necessary.
Instructions
Delete an order (use with caution)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orderid": "<orderid>"
},
"name": "whmcs_delete_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderid | Yes | Order ID |
Implementation Reference
- src/index.ts:834-849 (registration)Registration of the 'whmcs_delete_order' tool with the MCP server. Defines input schema (orderid: number) and delegates execution to whmcsClient.deleteOrder().
server.registerTool( 'whmcs_delete_order', { title: 'Delete Order', description: 'Delete an order (use with caution)', inputSchema: { orderid: z.number().describe('Order ID'), }, }, async (params) => { const result = await whmcsClient.deleteOrder(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/whmcs-client.ts:1034-1036 (handler)Implementation of the deleteOrder method on the WHMCS API client. Calls the WHMCS 'DeleteOrder' API action via the generic call() method.
async deleteOrder(params: { orderid: number }) { return this.call<WhmcsApiResponse>('DeleteOrder', params); }