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
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to lock/unlock | |
| lock | No | Action: 'lock' to enable transfer lock, 'unlock' to disable it (default: 'lock') |
Implementation Reference
- src/tools/settings.ts:186-215 (registration)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, }; } } ); - src/services/dynadot-client.ts:360-364 (handler)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); }