Get Ticket Details
whmcs_get_ticketRetrieve full details and reply history for a WHMCS support ticket by providing its ID.
Instructions
Get detailed information about a specific ticket including replies
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketid | Yes | Ticket ID |
Implementation Reference
- src/index.ts:437-452 (registration)Registration of the 'whmcs_get_ticket' tool on the MCP server, including input schema (ticketid: number) and the handler that calls whmcsClient.getTicket(params).
server.registerTool( '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:439-444 (schema)Input schema for whmcs_get_ticket: requires ticketid (number) to identify the ticket.
{ title: 'Get Ticket Details', description: 'Get detailed information about a specific ticket including replies', inputSchema: { ticketid: z.number().describe('Ticket ID'), }, - src/index.ts:446-451 (handler)Handler function for whmcs_get_ticket: calls whmcsClient.getTicket(params) and returns the result as JSON text.
async (params) => { const result = await whmcsClient.getTicket(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } - src/whmcs-client.ts:654-699 (helper)WhmcsApiClient.getTicket() implementation: calls WHMCS API action 'GetTicket' with ticketid parameter, returns detailed ticket info including 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); }