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
| Name | Required | Description | Default |
|---|---|---|---|
| clientid | No | The client ID to retrieve | |
| No | The email address to search for | ||
| stats | No | Include client statistics |
Implementation Reference
- src/index.ts:82-87 (handler)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) }], }; }
- src/index.ts:77-80 (schema)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) }], }; } );
- src/whmcs-client.ts:129-165 (helper)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); }