Add Ticket Note
whmcs_add_ticket_noteAdd an internal note to a ticket that only admins can see and does not trigger email notifications.
Instructions
Add an admin-only internal note to a ticket. Notes are not visible to the client and do not trigger email notifications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketid | Yes | Ticket ID to add the note to | |
| message | Yes | The note content | |
| markdown | No | Whether the message contains markdown formatting |
Implementation Reference
- src/index.ts:508-525 (registration)Registration of the 'whmcs_add_ticket_note' tool via server.registerTool with name, schema, and handler.
server.registerTool( 'whmcs_add_ticket_note', { title: 'Add Ticket Note', description: 'Add an admin-only internal note to a ticket. Notes are not visible to the client and do not trigger email notifications.', inputSchema: { ticketid: z.number().describe('Ticket ID to add the note to'), message: z.string().describe('The note content'), markdown: z.boolean().optional().describe('Whether the message contains markdown formatting'), }, }, async (params) => { const result = await whmcsClient.addTicketNote(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/index.ts:513-517 (schema)Input schema definition for the 'whmcs_add_ticket_note' tool, specifying ticketid (required number), message (required string), and markdown (optional boolean).
inputSchema: { ticketid: z.number().describe('Ticket ID to add the note to'), message: z.string().describe('The note content'), markdown: z.boolean().optional().describe('Whether the message contains markdown formatting'), }, - src/index.ts:519-524 (handler)Handler function that receives the validated params and delegates to whmcsClient.addTicketNote(), then returns the JSON result.
async (params) => { const result = await whmcsClient.addTicketNote(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } - src/whmcs-client.ts:747-758 (helper)The addTicketNote() method on WhmcsApiClient that sends the 'AddTicketNote' API action to WHMCS. Accepts ticketid, message, markdown, and optional attachments.
/** * Add an admin-only internal note to a ticket * Notes are not visible to clients and do not trigger email notifications */ async addTicketNote(params: { ticketid: number; message: string; markdown?: boolean; attachments?: Array<{ name: string; data: string }>; }) { return this.call<WhmcsApiResponse>('AddTicketNote', params); }