Skip to main content
Glama

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
NameRequiredDescriptionDefault
ticketidYesTicket ID to delete

Implementation Reference

  • 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) }],
            };
        }
    );
  • Zod input schema for the tool, validating that 'ticketid' is provided as a number.
    inputSchema: {
        ticketid: z.number().describe('Ticket ID to delete'),
    },

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/scarecr0w12/whmcs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server