Skip to main content
Glama

lock_domain

Lock or unlock domain transfers to prevent unauthorized domain transfers. This tool enables or disables transfer protection for domains registered with Dynadot.

Instructions

Lock or unlock a domain for transfer protection. Locking enables clientTransferProhibited status to prevent unauthorized transfers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to lock/unlock
lockNoAction: 'lock' to enable transfer lock, 'unlock' to disable it (default: 'lock')

Implementation Reference

  • Registration of the 'lock_domain' tool using the server.tool method.
    server.tool(
      "lock_domain",
      "Lock or unlock a domain for transfer protection. Locking enables " +
        "clientTransferProhibited status to prevent unauthorized transfers.",
      {
        domain: z.string().describe("Domain name to lock/unlock"),
        lock: z
          .enum(["lock", "unlock"])
          .optional()
          .describe("Action: 'lock' to enable transfer lock, 'unlock' to disable it (default: 'lock')"),
      },
      async ({ domain, lock }) => {
        try {
          const result = await client.lockDomain(domain, lock);
          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 lock/unlock domain: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Implementation of the lockDomain method within the Dynadot client which performs the API call.
    async lockDomain(domain: string, lock?: string): Promise<DynadotResponse> {
      const params: Record<string, string> = { domain };
      if (lock !== undefined) params.lock = lock;
      return this.call("lock_domain", params);
    }

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/mikusnuz/dynadot-mcp'

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