Skip to main content
Glama

Update Ticket

whmcs_update_ticket

Update WHMCS ticket details including department, subject, priority, status, and assigned staff.

Instructions

Update ticket properties

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketidYesTicket ID
deptidNoDepartment ID
subjectNoSubject
useridNoAssign to client ID
nameNoName
emailNoEmail
priorityNoPriority
statusNoStatus
flagNoFlag to admin ID

Implementation Reference

  • src/index.ts:527-550 (registration)
    Registration of the 'whmcs_update_ticket' tool on the MCP server with input schema definition (ticketid, deptid, subject, userid, name, email, priority, status, flag). The handler calls whmcsClient.updateTicket(params) and returns the result as JSON text.
    server.registerTool(
        'whmcs_update_ticket',
        {
            title: 'Update Ticket',
            description: 'Update ticket properties',
            inputSchema: {
                ticketid: z.number().describe('Ticket ID'),
                deptid: z.number().optional().describe('Department ID'),
                subject: z.string().optional().describe('Subject'),
                userid: z.number().optional().describe('Assign to client ID'),
                name: z.string().optional().describe('Name'),
                email: z.string().optional().describe('Email'),
                priority: z.enum(['Low', 'Medium', 'High']).optional().describe('Priority'),
                status: z.string().optional().describe('Status'),
                flag: z.number().optional().describe('Flag to admin ID'),
            },
        },
        async (params) => {
            const result = await whmcsClient.updateTicket(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Input schema for whmcs_update_ticket tool defining optional fields: ticketid (required number), deptid, subject, userid, name, email, priority (Low/Medium/High), status, flag.
        inputSchema: {
            ticketid: z.number().describe('Ticket ID'),
            deptid: z.number().optional().describe('Department ID'),
            subject: z.string().optional().describe('Subject'),
            userid: z.number().optional().describe('Assign to client ID'),
            name: z.string().optional().describe('Name'),
            email: z.string().optional().describe('Email'),
            priority: z.enum(['Low', 'Medium', 'High']).optional().describe('Priority'),
            status: z.string().optional().describe('Status'),
            flag: z.number().optional().describe('Flag to admin ID'),
        },
    },
  • Handler function for whmcs_update_ticket - an async arrow function that calls whmcsClient.updateTicket(params) and wraps the result in MCP content response.
    async (params) => {
        const result = await whmcsClient.updateTicket(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • The actual API client method 'updateTicket' in WhmcsApiClient that sends an 'UpdateTicket' action to the WHMCS API with parameters matching the tool's input schema (ticketid, deptid, subject, userid, name, email, cc, priority, status, flag, etc.).
    /**
     * Update ticket status
     */
    async updateTicket(params: {
        ticketid: number;
        deptid?: number;
        subject?: string;
        userid?: number;
        name?: string;
        email?: string;
        cc?: string;
        priority?: 'Low' | 'Medium' | 'High';
        status?: string;
        flag?: number;
        removeattachments?: boolean;
        message?: string;
        markdown?: boolean;
        customfields?: string;
    }) {
        return this.call<WhmcsApiResponse & { ticketid: number }>('UpdateTicket', params);
    }
Behavior2/5

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

No annotations exist, so the description must disclose behavioral traits. It only states 'Update ticket properties', implying a mutation, but fails to explain permissions, reversibility, side effects, or notifications. This is insufficient for an update operation.

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

Conciseness4/5

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

The description consists of a single concise sentence that is front-loaded and not verbose. It efficiently conveys the core action, though it could be slightly more descriptive without becoming wordy.

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 has 9 parameters and no output schema or annotations, the description is incomplete. It does not explain the return value, error handling, or important context such as required permissions or the effect of updating certain fields.

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?

The input schema provides full coverage with descriptions for all 9 parameters, so the description does not need to add parameter details. The baseline score of 3 is appropriate as the description adds no additional semantic value.

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

Purpose4/5

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

The description states 'Update ticket properties', clearly indicating the verb and resource, which distinguishes it from sibling tools like create, delete, or get tickets. However, it lacks specificity about what properties can be updated, though the input schema covers this.

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

Usage Guidelines1/5

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

No usage guidelines are provided. The description does not indicate when to use this tool over alternatives like whmcs_add_ticket_note or whmcs_add_ticket_reply, nor does it mention any prerequisites or exclusions.

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