Skip to main content
Glama

dynadot_account

Manage Dynadot account settings, check balances, and configure default domain preferences like WHOIS contacts, nameservers, and DNS records through the Domain MCP server.

Instructions

Account info, balance, and default settings for new domains. Manage API keys: https://www.dynadot.com/account/domain/setting/api.html?s9F6L9F7U8Q9U8Z8v

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: info: Get account information | balance: Get account balance | set_default_whois: Set default WHOIS contact | set_default_ns: Set default nameservers | set_default_parking: Set default parking | set_default_forwarding: Set default forwarding | set_default_stealth: Set default stealth forwarding | set_default_hosting: Set default hosting | set_default_dns: Set default DNS | set_default_dns2: Set default DNS2 | set_default_email_forward: Set default email forwarding | set_default_renew_option: Set default renewal option | clear_defaults: Clear all default settings
currencyNoCurrency code (default: USD)USD
contactIdNoContact ID
nameserversNoList of nameservers
forwardUrlNoURL
stealthUrlNoURL
optionsNo
mainRecordsNo
subdomainRecordsNo
emailNoEmail address
renewOptionNo

Implementation Reference

  • Input schema and action definitions for the 'dynadot_account' composite tool. Each action maps to a specific Dynadot API command, with Zod validation schemas and optional parameter transformers.
    { name: 'dynadot_account', description: `Account info, balance, and default settings for new domains. Manage API keys: ${DYNADOT_URLS.apiKey}`, actions: { info: { command: 'account_info', description: 'Get account information', }, balance: { command: 'get_account_balance', description: 'Get account balance', params: z.object({ currency: p.currency.optional() }), }, set_default_whois: { command: 'set_default_whois', description: 'Set default WHOIS contact', params: z.object({ contactId: p.contactId }), transform: (_, input) => ({ contact_id: input.contactId as string }), }, set_default_ns: { command: 'set_default_ns', description: 'Set default nameservers', params: z.object({ nameservers: p.nameservers }), transform: (_, input) => tx.defaultNs(input), }, set_default_parking: { command: 'set_default_parking', description: 'Set default parking', }, set_default_forwarding: { command: 'set_default_forwarding', description: 'Set default forwarding', params: z.object({ forwardUrl: p.url }), transform: (_, input) => ({ forward_url: input.forwardUrl as string }), }, set_default_stealth: { command: 'set_default_stealth', description: 'Set default stealth forwarding', params: z.object({ stealthUrl: p.url }), transform: (_, input) => ({ stealth_url: input.stealthUrl as string }), }, set_default_hosting: { command: 'set_default_hosting', description: 'Set default hosting', params: z.object({ options: z.record(z.string(), z.string()) }), transform: (_, input) => { const params: ApiParams = {}; for (const [k, v] of Object.entries(input.options as Record<string, string>)) { params[k] = v; } return params; }, }, set_default_dns: { command: 'set_default_dns', description: 'Set default DNS', params: z.object({ mainRecords: z.array(dnsRecord).optional(), subdomainRecords: z.array(subdomainRecord).optional(), }), transform: (_, input) => tx.defaultDns(input), }, set_default_dns2: { command: 'set_default_dns2', description: 'Set default DNS2', params: z.object({ mainRecords: z.array(dnsRecord).optional(), subdomainRecords: z.array(subdomainRecord).optional(), }), transform: (_, input) => tx.defaultDns(input), }, set_default_email_forward: { command: 'set_default_email_forward', description: 'Set default email forwarding', params: z.object({ email: p.email }), }, set_default_renew_option: { command: 'set_default_renew_option', description: 'Set default renewal option', params: z.object({ renewOption: z.enum(['auto', 'donot']) }), transform: (_, input) => ({ renew_option: input.renewOption as string }), }, clear_defaults: { command: 'set_clear_default_setting', description: 'Clear all default settings', }, }, },
  • src/register.ts:6-65 (registration)
    Registers the 'dynadot_account' tool (and others) with the MCP server. Dynamically generates input schema from composite actions and attaches generic handler.
    export function registerAllTools(server: McpServer): void { for (const tool of compositeTools) { // Build action enum from keys const actionKeys = Object.keys(tool.actions) as [string, ...string[]]; // Build combined input schema with action + all possible params const actionDescriptions = actionKeys .map((k) => { const actionDef = tool.actions[k]; return actionDef ? `${k}: ${actionDef.description}` : k; }) .join(' | '); const inputSchema: Record<string, z.ZodTypeAny> = { action: z.enum(actionKeys).describe(`Action to perform: ${actionDescriptions}`), }; // Collect all unique params across actions for (const action of Object.values(tool.actions)) { if (action?.params) { const shape = action.params.shape; for (const [key, schema] of Object.entries(shape)) { if (!inputSchema[key]) { // Make optional since not all actions need all params inputSchema[key] = (schema as z.ZodTypeAny).optional(); } } } } server.registerTool( tool.name, { description: tool.description, inputSchema, }, async (input) => { const action = input.action as string; const actionDef = tool.actions[action]; if (!actionDef) { throw new Error(`Unknown action: ${action}. Valid actions: ${actionKeys.join(', ')}`); } const client = getClient(); const params = actionDef.transform ? actionDef.transform(action, input as Record<string, unknown>) : (input as ApiParams); // Remove 'action' from params sent to API delete params.action; const result = await client.execute(actionDef.command, params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); } }
  • Handler implementation for the dynadot_account tool: parses 'action' input, looks up action definition, transforms parameters if needed, calls Dynadot API via client.execute(), and returns formatted JSON response.
    tool.name, { description: tool.description, inputSchema, }, async (input) => { const action = input.action as string; const actionDef = tool.actions[action]; if (!actionDef) { throw new Error(`Unknown action: ${action}. Valid actions: ${actionKeys.join(', ')}`); } const client = getClient(); const params = actionDef.transform ? actionDef.transform(action, input as Record<string, unknown>) : (input as ApiParams); // Remove 'action' from params sent to API delete params.action; const result = await client.execute(actionDef.command, params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joachimBrindeau/domain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server