set_account_defaults
Configure default settings for new domain registrations, including WHOIS contacts, nameservers, DNS, and renewal options.
Instructions
Set default account settings for new domain registrations. Supports default WHOIS contacts, nameservers, DNS, parking, forwarding, stealth, hosting, email forwarding, and renewal options.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| setting_type | Yes | Type of default setting: 'whois', 'ns', 'dns' (basic DNS), 'dns2' (advanced DNS), 'parking', 'forwarding', 'stealth', 'hosting', 'email_forward', 'renew_option', or 'clear' (remove defaults) | |
| params | No | Setting parameters as key-value pairs (varies by type) |
Implementation Reference
- src/tools/account.ts:72-112 (handler)The `set_account_defaults` tool handler defines the MCP tool registration, input schema using Zod, and the execution logic which calls the Dynadot client with dynamically generated command strings based on the provided `setting_type`.
server.tool( "set_account_defaults", "Set default account settings for new domain registrations. Supports " + "default WHOIS contacts, nameservers, DNS, parking, forwarding, " + "stealth, hosting, email forwarding, and renewal options.", { setting_type: z .enum(["whois", "ns", "dns", "dns2", "parking", "forwarding", "stealth", "hosting", "email_forward", "renew_option", "clear"]) .describe( "Type of default setting: 'whois', 'ns', 'dns' (basic DNS), 'dns2' (advanced DNS), " + "'parking', 'forwarding', 'stealth', 'hosting', 'email_forward', " + "'renew_option', or 'clear' (remove defaults)" ), params: z .record(z.string()) .optional() .describe("Setting parameters as key-value pairs (varies by type)"), }, async ({ setting_type, params }) => { try { const command = setting_type === "clear" ? "set_clear_default_setting" : `set_default_${setting_type}`; const result = await client.call(command, params || {}); 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 defaults: ${msg}` }, ], isError: true, }; } } );