whmcs_get_ticket
Retrieve detailed information and replies for a specific WHMCS support ticket by providing its ticket ID.
Instructions
Get detailed information about a specific ticket including replies
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketid | Yes | Ticket ID |
Implementation Reference
- src/whmcs-client.ts:654-699 (handler)Core implementation of the whmcs_get_ticket tool logic in WhmcsApiClient.getTicket(). Performs authenticated API request to WHMCS 'GetTicket' endpoint, returning ticket details, replies, and notes.async getTicket(params: { ticketid: number }) { return this.call<WhmcsApiResponse & { ticketid: number; tid: string; c: string; deptid: number; deptname: string; userid: number; contactid: number; name: string; email: string; cc: string; date: string; subject: string; status: string; priority: string; admin: string; lastreply: string; flag: number; service: string; replies: { reply: Array<{ replyid: number; userid: number; contactid: number; name: string; email: string; requestor_name: string; requestor_email: string; requestor_type: string; admin: string; date: string; message: string; attachment: string; attachments_removed: boolean; rating: number; }> }; notes: { note: Array<{ noteid: number; admin: string; date: string; message: string; attachments: string[]; attachments_removed: boolean; }> }; }>('GetTicket', params); }
- src/index.ts:438-452 (registration)MCP tool registration for 'whmcs_get_ticket' including schema validation, thin handler wrapper, and delegation to WhmcsApiClient.getTicket().'whmcs_get_ticket', { title: 'Get Ticket Details', description: 'Get detailed information about a specific ticket including replies', inputSchema: { ticketid: z.number().describe('Ticket ID'), }, }, async (params) => { const result = await whmcsClient.getTicket(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
- src/index.ts:442-444 (schema)Zod input schema for whmcs_get_ticket tool requiring a numeric ticketid parameter.inputSchema: { ticketid: z.number().describe('Ticket ID'), },