Skip to main content
Glama

whmcs_get_client_details

Retrieve detailed client information from WHMCS by ID or email, optionally including statistics for account management.

Instructions

Get detailed information about a specific client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientidNoThe client ID to retrieve
emailNoThe email address to search for
statsNoInclude client statistics

Implementation Reference

  • The execution handler for the 'whmcs_get_client_details' MCP tool. It calls the WhmcsApiClient.getClientDetails method with the input parameters and returns the JSON-formatted result as text content.
    async (params) => {
        const result = await whmcsClient.getClientDetails(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • Zod input schema defining the parameters for the whmcs_get_client_details tool: optional client ID, email, or stats flag.
        clientid: z.number().optional().describe('The client ID to retrieve'),
        email: z.string().optional().describe('The email address to search for'),
        stats: z.boolean().optional().describe('Include client statistics'),
    },
  • src/index.ts:71-88 (registration)
    Registration of the 'whmcs_get_client_details' tool in the MCP server using server.registerTool, including title, description, schema, and handler.
    server.registerTool(
        'whmcs_get_client_details',
        {
            title: 'Get Client Details',
            description: 'Get detailed information about a specific client',
            inputSchema: {
                clientid: z.number().optional().describe('The client ID to retrieve'),
                email: z.string().optional().describe('The email address to search for'),
                stats: z.boolean().optional().describe('Include client statistics'),
            },
        },
        async (params) => {
            const result = await whmcsClient.getClientDetails(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • WhmcsApiClient helper method that performs the actual WHMCS API call to 'GetClientsDetails' action, returning typed client details.
    async getClientDetails(params: {
        clientid?: number;
        email?: string;
        stats?: boolean;
    }) {
        return this.call<WhmcsApiResponse & {
            client: {
                id: number;
                firstname: string;
                lastname: string;
                fullname: string;
                companyname: string;
                email: string;
                address1: string;
                address2: string;
                city: string;
                state: string;
                postcode: string;
                country: string;
                phonenumber: string;
                status: string;
                credit: string;
                taxexempt: boolean;
                latefeeoveride: boolean;
                overideduenotices: boolean;
                separateinvoices: boolean;
                disableautocc: boolean;
                emailoptout: boolean;
                overrideautoclose: boolean;
                allowSingleSignOn: number;
                language: string;
                lastlogin: string;
                currency_id: number;
                notes: string;
            };
        }>('GetClientsDetails', params);
    }

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

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