Get Domain Nameservers
whmcs_get_domain_nameserversRetrieve nameservers for a domain by providing its domain ID. Returns the current nameserver configuration.
Instructions
Get nameservers for a domain
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domainid | Yes | Domain ID |
Implementation Reference
- src/index.ts:676-691 (registration)Registration of the 'whmcs_get_domain_nameservers' tool in the MCP server. Defines input schema requiring a domainid parameter and delegates to whmcsClient.getDomainNameservers().
server.registerTool( 'whmcs_get_domain_nameservers', { title: 'Get Domain Nameservers', description: 'Get nameservers for a domain', inputSchema: { domainid: z.number().describe('Domain ID'), }, }, async (params) => { const result = await whmcsClient.getDomainNameservers(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/whmcs-client.ts:875-890 (handler)The handler/helper method that implements the actual API call. Calls the WHMCS API action 'DomainGetNameservers' with the provided domainid parameter and returns typed response containing ns1-ns5 fields.
}) { return this.call<WhmcsApiResponse>('DomainUpdateNameservers', params); } /** * Get domain nameservers */ async getDomainNameservers(params: { domainid: number }) { return this.call<WhmcsApiResponse & { ns1: string; ns2: string; ns3: string; ns4: string; ns5: string; }>('DomainGetNameservers', params); }