add_nameserver
Add a new nameserver entry by specifying a hostname and IP address to manage DNS configuration for domains.
Instructions
Add (create) a new nameserver entry 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/services/dynadot-client.ts:234-236 (handler)The actual implementation of the addNameserver service method that calls the underlying Dynadot API.
async addNameserver(host: string, ip: string): Promise<DynadotResponse> { return this.call("add_ns", { host, ip }); } - src/tools/dns.ts:269-290 (registration)The MCP tool registration and handler implementation for "add_nameserver".
server.tool( "add_nameserver", "Add (create) a new nameserver entry 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.addNameserver(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 add nameserver: ${msg}` }, ], isError: true,