Skip to main content
Glama

Get Clients

whmcs_get_clients

Retrieve a filtered, paginated list of WHMCS clients by status, search term, or sorting order.

Instructions

Get a list of clients from WHMCS with optional filtering and pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitstartNoStarting offset for results (default 0)
limitnumNoNumber of results to return (default 25)
sortingNoSort order
statusNoFilter by status (Active, Inactive, Closed)
searchNoSearch term to filter clients
orderbyNoField to order by

Implementation Reference

  • src/index.ts:49-69 (registration)
    Registration of the 'whmcs_get_clients' tool via server.registerTool(), with input schema (limitstart, limitnum, sorting, status, search, orderby) and handler that delegates to whmcsClient.getClients()
    server.registerTool(
        'whmcs_get_clients',
        {
            title: 'Get Clients',
            description: 'Get a list of clients from WHMCS with optional filtering and pagination',
            inputSchema: {
                limitstart: z.number().optional().describe('Starting offset for results (default 0)'),
                limitnum: z.number().optional().describe('Number of results to return (default 25)'),
                sorting: z.enum(['ASC', 'DESC']).optional().describe('Sort order'),
                status: z.string().optional().describe('Filter by status (Active, Inactive, Closed)'),
                search: z.string().optional().describe('Search term to filter clients'),
                orderby: z.string().optional().describe('Field to order by'),
            },
        },
        async (params) => {
            const result = await whmcsClient.getClients(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Handler function for whmcs_get_clients - calls whmcsClient.getClients(params) and formats JSON response
    async (params) => {
        const result = await whmcsClient.getClients(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • Input schema definitions for whmcs_get_clients using Zod with optional parameters: limitstart, limitnum, sorting (ASC/DESC), status, search, orderby
    inputSchema: {
        limitstart: z.number().optional().describe('Starting offset for results (default 0)'),
        limitnum: z.number().optional().describe('Number of results to return (default 25)'),
        sorting: z.enum(['ASC', 'DESC']).optional().describe('Sort order'),
        status: z.string().optional().describe('Filter by status (Active, Inactive, Closed)'),
        search: z.string().optional().describe('Search term to filter clients'),
        orderby: z.string().optional().describe('Field to order by'),
    },
  • WhmcsApiClient.getClients() method - the actual API call implementation sending 'GetClients' action to WHMCS API with typed response including client array
    async getClients(params: {
        limitstart?: number;
        limitnum?: number;
        sorting?: 'ASC' | 'DESC';
        status?: string;
        search?: string;
        orderby?: string;
    } = {}) {
        return this.call<WhmcsApiResponse & {
            totalresults: number;
            startnumber: number;
            numreturned: number;
            clients: { client: Array<{
                id: number;
                firstname: string;
                lastname: string;
                companyname: string;
                email: string;
                datecreated: string;
                groupid: number;
                status: string;
            }> };
        }>('GetClients', params);
    }
Behavior2/5

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

No annotations are present, so the description must disclose behavioral traits. It states 'Get a list' implying read-only, but does not mention if results are paginated (though schema hints), auth requirements, rate limits, or what data is returned (IDs vs full objects). The description lacks transparency beyond the operation type.

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 is a single, concise sentence with no fluff. It front-loads the key action and resource. However, it could be slightly expanded without harm, but for its length it is appropriate.

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 no output schema and no annotations, the description is insufficient for a list tool with 6 parameters. It does not mention return format (e.g., array of client objects), total count, or errors. Siblings like whmcs_get_client_details exist, and the description does not help the agent differentiate or understand the scope.

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 baseline is 3. The description only says 'optional filtering and pagination', adding no extra meaning beyond what the schema already provides for each parameter. It does not explain how parameters interact or provide usage examples.

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 'Get a list of clients from WHMCS with optional filtering and pagination' clearly states the verb ('Get') and resource ('list of clients'). It distinguishes from siblings like whmcs_get_client_details (single client) by implying a list retrieval. However, it could be more specific about the result being a summary list rather than full details.

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 is provided on when to use this tool versus alternatives. For instance, whmcs_get_client_details is better for a single client, and whmcs_add_client or whmcs_update_client are for mutations. The description does not indicate prerequisites, exclusions, or 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