Get Domain WHOIS
whmcs_get_domain_whoisRetrieve WHOIS information for a domain by providing the domain ID.
Instructions
Get WHOIS information for a domain
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domainid | Yes | Domain ID |
Implementation Reference
- src/index.ts:659-674 (registration)Registration of the 'whmcs_get_domain_whois' tool via server.registerTool, defining its name, title, description, input schema (domainid), and the handler that calls whmcsClient.getDomainWhoisInfo().
server.registerTool( 'whmcs_get_domain_whois', { title: 'Get Domain WHOIS', description: 'Get WHOIS information for a domain', inputSchema: { domainid: z.number().describe('Domain ID'), }, }, async (params) => { const result = await whmcsClient.getDomainWhoisInfo(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/index.ts:664-666 (schema)Input schema for the tool: expects a single 'domainid' (number) parameter.
inputSchema: { domainid: z.number().describe('Domain ID'), }, - src/index.ts:668-673 (handler)Handler function that executes the tool logic — calls whmcsClient.getDomainWhoisInfo(params) and returns the result as JSON text content.
async (params) => { const result = await whmcsClient.getDomainWhoisInfo(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } - src/whmcs-client.ts:850-863 (helper)The getDomainWhoisInfo method on WhmcsApiClient. Makes a 'DomainWhois' API call to WHMCS with the domainid, returning WHOIS contact data (registrant, admin, tech, billing) mapped to typed Record<string, string> objects.
/** * Get domain WHOIS info */ async getDomainWhoisInfo(params: { domainid: number }) { return this.call<WhmcsApiResponse & { status: string; domain: { registrant: Record<string, string>; admin: Record<string, string>; tech: Record<string, string>; billing: Record<string, string>; }; }>('DomainWhois', params); }