register_nameserver
Register a custom nameserver with a hostname and IP address to manage DNS records for domains.
Instructions
Register a custom nameserver (glue record) with a hostname and IP address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Nameserver hostname (e.g., 'ns1.example.com') | |
| ip | Yes | IP address for the nameserver |
Implementation Reference
- src/tools/dns.ts:155-180 (handler)Tool handler definition for "register_nameserver" in src/tools/dns.ts.
server.tool( "register_nameserver", "Register a custom nameserver (glue record) with a hostname and IP address.", { host: z.string().describe("Nameserver hostname (e.g., 'ns1.example.com')"), ip: z.string().describe("IP address for the nameserver"), }, async ({ host, ip }) => { try { const result = await client.registerNameserver(host, ip); 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 register nameserver: ${msg}` }, ], isError: true, }; } } ); - Implementation of the API call for register_nameserver in the DynadotClient class.
async registerNameserver(host: string, ip: string): Promise<DynadotResponse> { return this.call("register_ns", { host, ip }); }