set_whois_contacts
Update WHOIS contact information for a domain by specifying contact IDs for registrant, admin, technical, and billing contacts.
Instructions
Set WHOIS contact information for a domain. Specify contact IDs for registrant, admin, technical, and/or billing contacts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to update | |
| registrant_contact | No | Contact ID for the registrant | |
| admin_contact | No | Contact ID for the admin contact | |
| technical_contact | No | Contact ID for the technical contact | |
| billing_contact | No | Contact ID for the billing contact |
Implementation Reference
- src/tools/settings.ts:55-101 (handler)The MCP tool registration and handler for 'set_whois_contacts', which collects contact IDs and calls the Dynadot client.
server.tool( "set_whois_contacts", "Set WHOIS contact information for a domain. Specify contact IDs for " + "registrant, admin, technical, and/or billing contacts.", { domain: z.string().describe("Domain name to update"), registrant_contact: z .string() .optional() .describe("Contact ID for the registrant"), admin_contact: z .string() .optional() .describe("Contact ID for the admin contact"), technical_contact: z .string() .optional() .describe("Contact ID for the technical contact"), billing_contact: z .string() .optional() .describe("Contact ID for the billing contact"), }, async ({ domain, registrant_contact, admin_contact, technical_contact, billing_contact }) => { try { const contacts: Record<string, string> = {}; if (registrant_contact) contacts.registrant_contact = registrant_contact; if (admin_contact) contacts.admin_contact = admin_contact; if (technical_contact) contacts.technical_contact = technical_contact; if (billing_contact) contacts.billing_contact = billing_contact; const result = await client.setWhoisContacts(domain, contacts); 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 WHOIS contacts: ${msg}` }, ], isError: true, }; } } ); - src/services/dynadot-client.ts:340-342 (handler)The actual Dynadot API client implementation for setting WHOIS contacts, mapping to the 'set_whois' command.
async setWhoisContacts(domain: string, contacts: Record<string, string>): Promise<DynadotResponse> { return this.call("set_whois", { domain, ...contacts }); }