Get Client Details
whmcs_get_client_detailsRetrieve detailed client information using client ID or email, with optional statistics for account management.
Instructions
Get detailed information about a specific client
Input 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:71-88 (registration)Tool registration for 'whmcs_get_client_details' using server.registerTool with name 'whmcs_get_client_details', input schema (clientid, email, stats), and handler that calls whmcsClient.getClientDetails(params).
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:126-165 (handler)The actual handler method getClientDetails on the WhmcsApiClient class. Makes a 'GetClientsDetails' API call to WHMCS with params (clientid?, email?, stats?) and returns typed response including full client details (name, address, status, credit, etc.).
/** * Get details about a specific client */ 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); } - src/index.ts:76-80 (schema)Input schema definition for whmcs_get_client_details: clientid (optional number), email (optional string), stats (optional boolean).
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'), }, - src/whmcs-client.ts:129-133 (schema)TypeScript parameter type definition for getClientDetails method: clientid?, email?, stats?.
async getClientDetails(params: { clientid?: number; email?: string; stats?: boolean; }) {