Skip to main content
Glama

dynadot_transfer

Manage domain transfers through Dynadot: initiate transfers, check status, handle authorization codes, and process push requests between registrars.

Instructions

Domain transfers: initiate, check status, manage auth codes, push requests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: initiate: Initiate domain transfer | status: Check transfer status | cancel: Cancel pending transfer | get_auth_code: Get transfer auth code | set_auth_code: Set custom auth code | authorize_away: Authorize transfer to another registrar | get_push_request: Get pending push request | set_push_request: Accept or decline push request
domainNoDomain name (e.g., example.com)
authCodeNoAuthorization code

Implementation Reference

  • Composite tool schema for 'dynadot_transfer', defining input validation (Zod schemas) and parameter transformation functions for each transfer-related action (initiate, status, cancel, auth codes, push requests).
    { name: 'dynadot_transfer', description: 'Domain transfers: initiate, check status, manage auth codes, push requests', actions: { initiate: { command: 'transfer', description: 'Initiate domain transfer', params: z.object({ domain: p.domain, authCode: p.authCode }), transform: (_, input) => ({ domain: input.domain as string, auth: input.authCode as string, }), }, status: { command: 'get_transfer_status', description: 'Check transfer status', params: z.object({ domain: p.domain }), }, cancel: { command: 'cancel_transfer', description: 'Cancel pending transfer', params: z.object({ domain: p.domain }), }, get_auth_code: { command: 'get_transfer_auth_code', description: 'Get transfer auth code', params: z.object({ domain: p.domain }), }, set_auth_code: { command: 'set_transfer_auth_code', description: 'Set custom auth code', params: z.object({ domain: p.domain, authCode: p.authCode }), transform: (_, input) => ({ domain: input.domain as string, auth_code: input.authCode as string, }), }, authorize_away: { command: 'authorize_transfer_away', description: 'Authorize transfer to another registrar', params: z.object({ domain: p.domain }), }, get_push_request: { command: 'get_domain_push_request', description: 'Get pending push request', params: z.object({ domain: p.domain }), }, set_push_request: { command: 'set_domain_push_request', description: 'Accept or decline push request', params: z.object({ domain: p.domain, action: p.pushAction }), }, }, },
  • src/register.ts:6-65 (registration)
    Registers all composite tools, including 'dynadot_transfer', with the MCP server. Dynamically builds input schema from all possible actions/parameters, and provides a generic handler that dispatches to the appropriate Dynadot API command based on the selected action.
    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) }], }; } ); } }
  • Core API execution method called by the tool handler to send requests to Dynadot API endpoints.
    async execute(command: string, params: ApiParams = {}): Promise<ApiResponse> { const searchParams = new URLSearchParams(); searchParams.set('key', this.apiKey); searchParams.set('command', command); for (const [key, value] of Object.entries(params)) { if (value !== undefined) { searchParams.set(key, String(value)); } } const response = await this.client.get('api3.json', { searchParams }).json<ApiResponse>(); if (response.Status === 'error') { throw new Error(`Dynadot API error: ${response.Error || 'Unknown error'}`); } return response; }

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