Skip to main content
Glama

whmcs_get_domain_nameservers

Retrieve nameserver information for a domain using its ID in WHMCS. This tool helps manage domain configurations by providing current nameserver details.

Instructions

Get nameservers for a domain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainidYesDomain ID

Implementation Reference

  • src/index.ts:658-671 (registration)
    Registers the MCP tool 'whmcs_get_domain_nameservers' with input schema requiring domainid and a thin wrapper handler that delegates to WhmcsApiClient.getDomainNameservers
    '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) }],
        };
    }
  • The core handler method in WhmcsApiClient that performs the actual API call to WHMCS using action 'DomainGetNameservers' to retrieve the five nameservers (ns1-ns5) for the specified domain ID.
    async getDomainNameservers(params: { domainid: number }) {
        return this.call<WhmcsApiResponse & {
            ns1: string;
            ns2: string;
            ns3: string;
            ns4: string;
            ns5: string;
        }>('DomainGetNameservers', 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