Skip to main content
Glama

Update Client

whmcs_update_client

Update an existing WHMCS client's information including contact details, status, and account settings.

Instructions

Update an existing client in WHMCS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientidYesThe client ID to update
firstnameNoClient first name
lastnameNoClient last name
emailNoClient email address
companynameNoCompany name
address1NoStreet address
address2NoAddress line 2
cityNoCity
stateNoState/Province
postcodeNoPostal/ZIP code
countryNoCountry (2-letter ISO code)
phonenumberNoPhone number
password2NoNew password
statusNoClient status (Active, Inactive, Closed)
creditNoCredit balance
notesNoAdmin notes
languageNoClient language

Implementation Reference

  • src/index.ts:123-154 (registration)
    Tool registration for 'whmcs_update_client' on the MCP server with schema definition and handler that delegates to whmcsClient.updateClient()
    server.registerTool(
        'whmcs_update_client',
        {
            title: 'Update Client',
            description: 'Update an existing client in WHMCS',
            inputSchema: {
                clientid: z.number().describe('The client ID to update'),
                firstname: z.string().optional().describe('Client first name'),
                lastname: z.string().optional().describe('Client last name'),
                email: z.string().email().optional().describe('Client email address'),
                companyname: z.string().optional().describe('Company name'),
                address1: z.string().optional().describe('Street address'),
                address2: z.string().optional().describe('Address line 2'),
                city: z.string().optional().describe('City'),
                state: z.string().optional().describe('State/Province'),
                postcode: z.string().optional().describe('Postal/ZIP code'),
                country: z.string().optional().describe('Country (2-letter ISO code)'),
                phonenumber: z.string().optional().describe('Phone number'),
                password2: z.string().optional().describe('New password'),
                status: z.string().optional().describe('Client status (Active, Inactive, Closed)'),
                credit: z.string().optional().describe('Credit balance'),
                notes: z.string().optional().describe('Admin notes'),
                language: z.string().optional().describe('Client language'),
            },
        },
        async (params) => {
            const result = await whmcsClient.updateClient(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Zod input schema for whmcs_update_client - requires clientid, with optional fields for all updateable client properties
        inputSchema: {
            clientid: z.number().describe('The client ID to update'),
            firstname: z.string().optional().describe('Client first name'),
            lastname: z.string().optional().describe('Client last name'),
            email: z.string().email().optional().describe('Client email address'),
            companyname: z.string().optional().describe('Company name'),
            address1: z.string().optional().describe('Street address'),
            address2: z.string().optional().describe('Address line 2'),
            city: z.string().optional().describe('City'),
            state: z.string().optional().describe('State/Province'),
            postcode: z.string().optional().describe('Postal/ZIP code'),
            country: z.string().optional().describe('Country (2-letter ISO code)'),
            phonenumber: z.string().optional().describe('Phone number'),
            password2: z.string().optional().describe('New password'),
            status: z.string().optional().describe('Client status (Active, Inactive, Closed)'),
            credit: z.string().optional().describe('Credit balance'),
            notes: z.string().optional().describe('Admin notes'),
            language: z.string().optional().describe('Client language'),
        },
    },
  • Actual handler logic: WhmcsApiClient.updateClient() method that calls the WHMCS API 'UpdateClient' action via the generic call() method
    async updateClient(params: {
        clientid: number;
        firstname?: string;
        lastname?: string;
        companyname?: string;
        email?: string;
        address1?: string;
        address2?: string;
        city?: string;
        state?: string;
        postcode?: string;
        country?: string;
        phonenumber?: string;
        password2?: string;
        status?: string;
        credit?: string;
        taxexempt?: boolean;
        latefeeoveride?: boolean;
        overideduenotices?: boolean;
        separateinvoices?: boolean;
        disableautocc?: boolean;
        emailoptout?: boolean;
        language?: string;
        notes?: string;
    }) {
        return this.call<WhmcsApiResponse & { clientid: number }>('UpdateClient', params);
    }
Behavior1/5

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

With no annotations, the description carries full burden but only says 'Update an existing client', failing to disclose data mutation, field merge behavior, error handling, or side effects.

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

Conciseness2/5

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

Single sentence is too brief; it merely restates the tool name without providing useful context or justification for its conciseness.

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

Completeness1/5

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

For a mutation tool with 17 parameters and no output schema, the description fails to explain expected output, side effects, or typical use cases, leaving the agent underinformed.

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 coverage is 100%, so baseline is 3. Description adds no extra meaning beyond parameter descriptions already in schema.

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?

Clearly states the verb 'Update' and resource 'existing client' in WHMCS, distinctly differentiating from sibling tools like whmcs_add_client and whmcs_delete_client.

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 versus alternatives, no mention of prerequisites (e.g., client must exist), and no exclusions or contexts provided.

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