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

  • Handler function that dispatches the specified action for dynadot_transfer to the corresponding Dynadot API command, applies parameter transformation if defined, and returns the API response as JSON.
    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) }],
      };
    }
  • Zod schema definition for the dynadot_transfer tool, mapping user actions to specific Dynadot API commands with input validation and parameter transformation logic.
    {
      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:36-63 (registration)
    Registration of the dynadot_transfer tool (as part of loop over compositeTools) with dynamically generated input schema combining all action parameters as optional, and the shared handler.
    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) }],
        };
      }
    );
  • DynadotClient.execute method called by the handler to perform the actual API request to Dynadot.
    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