set_nameservers
Configure custom nameservers for a domain by specifying up to 13 hostnames to manage DNS routing through the Dynadot registrar.
Instructions
Set nameservers for a domain. Accepts up to 13 nameserver hostnames.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to configure | |
| nameservers | Yes | List of nameserver hostnames (e.g., ['ns1.example.com', 'ns2.example.com']) |
Implementation Reference
- src/services/dynadot-client.ts:206-212 (handler)The actual implementation of setNameservers in the DynadotClient service which calls the API3 'set_ns' command.
async setNameservers(domain: string, nameservers: string[]): Promise<DynadotResponse> { const params: Record<string, string> = { domain }; nameservers.forEach((ns, i) => { params[`ns${i}`] = ns; }); return this.call("set_ns", params); } - src/tools/dns.ts:94-123 (handler)The tool handler registration for "set_nameservers" in src/tools/dns.ts.
server.tool( "set_nameservers", "Set nameservers for a domain. Accepts up to 13 nameserver hostnames.", { domain: z.string().describe("Domain name to configure"), nameservers: z .array(z.string()) .min(1) .max(13) .describe("List of nameserver hostnames (e.g., ['ns1.example.com', 'ns2.example.com'])"), }, async ({ domain, nameservers }) => { try { const result = await client.setNameservers(domain, nameservers); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [ { type: "text" as const, text: `Failed to set nameservers: ${msg}` }, ], isError: true, }; } } );