set_auth_code
Set the transfer authorization (EPP) code for a domain to enable domain transfers between registrars using the Dynadot domain registrar API.
Instructions
Set the transfer authorization (EPP) code for a domain.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name | |
| auth_code | Yes | Authorization/EPP code to set |
Implementation Reference
- src/tools/transfer.ts:192-209 (handler)The handler function that executes the set_auth_code tool logic by calling client.setTransferAuthCode.
async ({ domain, auth_code }) => { try { const result = await client.setTransferAuthCode(domain, auth_code); 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 set auth code: ${msg}` }, ], isError: true, }; } } - src/tools/transfer.ts:185-210 (registration)Registration of the set_auth_code tool in the MCP server.
server.tool( "set_auth_code", "Set the transfer authorization (EPP) code for a domain.", { domain: z.string().describe("Domain name"), auth_code: z.string().describe("Authorization/EPP code to set"), }, async ({ domain, auth_code }) => { try { const result = await client.setTransferAuthCode(domain, auth_code); 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 set auth code: ${msg}` }, ], isError: true, }; } } ); - src/tools/transfer.ts:188-191 (schema)Input schema definition for the set_auth_code tool.
{ domain: z.string().describe("Domain name"), auth_code: z.string().describe("Authorization/EPP code to set"), },