Skip to main content
Glama

Add Ticket Reply

whmcs_add_ticket_reply

Reply to a support ticket by specifying ticket ID and message, with optional parameters like client ID, status, and admin username.

Instructions

Reply to an existing support ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketidYesTicket ID
messageYesReply message
clientidNoClient ID
contactidNoContact ID
nameNoName
emailNoEmail
adminusernameNoAdmin username
statusNoNew ticket status
noemailNoDo not send email
markdownNoMessage contains markdown

Implementation Reference

  • src/index.ts:482-506 (registration)
    Tool registration for 'whmcs_add_ticket_reply' - registers the tool with MCP server including input schema (ticketid, message, clientid, contactid, name, email, adminusername, status, noemail, markdown) and the handler that calls whmcsClient.addTicketReply()
    server.registerTool(
        'whmcs_add_ticket_reply',
        {
            title: 'Add Ticket Reply',
            description: 'Reply to an existing support ticket',
            inputSchema: {
                ticketid: z.number().describe('Ticket ID'),
                message: z.string().describe('Reply message'),
                clientid: z.number().optional().describe('Client ID'),
                contactid: z.number().optional().describe('Contact ID'),
                name: z.string().optional().describe('Name'),
                email: z.string().optional().describe('Email'),
                adminusername: z.string().optional().describe('Admin username'),
                status: z.string().optional().describe('New ticket status'),
                noemail: z.boolean().optional().describe('Do not send email'),
                markdown: z.boolean().optional().describe('Message contains markdown'),
            },
        },
        async (params) => {
            const result = await whmcsClient.addTicketReply(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Handler function (inline async callback) that calls whmcsClient.addTicketReply(params) and returns the JSON-stringified result
        async (params) => {
            const result = await whmcsClient.addTicketReply(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Input schema for addTicketReply using Zod validation - defines ticketid (required number), message (required string), and optional fields: clientid, contactid, name, email, adminusername, status, noemail, markdown
        inputSchema: {
            ticketid: z.number().describe('Ticket ID'),
            message: z.string().describe('Reply message'),
            clientid: z.number().optional().describe('Client ID'),
            contactid: z.number().optional().describe('Contact ID'),
            name: z.string().optional().describe('Name'),
            email: z.string().optional().describe('Email'),
            adminusername: z.string().optional().describe('Admin username'),
            status: z.string().optional().describe('New ticket status'),
            noemail: z.boolean().optional().describe('Do not send email'),
            markdown: z.boolean().optional().describe('Message contains markdown'),
        },
    },
  • addTicketReply method on WhmcsApiClient - the actual API client method that makes the WHMCS API call with action 'AddTicketReply', passing ticketid, message, and optional parameters
    /**
     * Reply to a ticket
     */
    async addTicketReply(params: {
        ticketid: number;
        message: string;
        clientid?: number;
        contactid?: number;
        name?: string;
        email?: string;
        adminusername?: string;
        status?: string;
        noemail?: boolean;
        customfields?: string;
        attachments?: Array<{ name: string; data: string }>;
        markdown?: boolean;
    }) {
        return this.call<WhmcsApiResponse>('AddTicketReply', params);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It only states the basic action without disclosing effects (e.g., status changes, email notifications, or side effects). The minimal information is insufficient for understanding behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, but it does not justify its existence by providing value beyond the obvious. It is not verbose, but it lacks substance needed for a tool with 10 parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 parameters, no annotations, no output schema), the description is incomplete. It fails to explain return values, side effects, or how parameters interrelate, making it inadequate for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents each parameter. The description adds no extra meaning or context about parameter usage or relationships (e.g., clientid vs contactid). Baseline 3 applies as description offers no additional value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it replies to an existing support ticket, using a specific verb and resource. This distinguishes it from sibling tools like whmcs_add_ticket_note (note vs reply) and whmcs_open_ticket (new ticket).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives (e.g., whmcs_add_ticket_note), nor prerequisites like ticket existence. The description lacks context on appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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-tool'

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