Skip to main content
Glama

register_domain

Register a new domain name with Dynadot for 1-10 years, optionally applying coupon codes and specifying registrant contacts.

Instructions

Register a new domain name. Duration is in years (1-10). Optionally specify a registrant contact ID and coupon code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to register (e.g., 'example.com')
durationYesRegistration duration in years
registrant_contactNoContact ID to use as registrant
currencyNoCurrency for payment (e.g., 'USD')
couponNoCoupon code for discount

Implementation Reference

  • The 'register_domain' tool is defined and implemented here using `server.tool`. It uses the Zod schema for input validation and calls the `client.register` method to perform the domain registration.
    server.tool(
      "register_domain",
      "Register a new domain name. Duration is in years (1-10). " +
        "Optionally specify a registrant contact ID and coupon code.",
      {
        domain: z.string().describe("Domain name to register (e.g., 'example.com')"),
        duration: z
          .number()
          .int()
          .min(1)
          .max(10)
          .describe("Registration duration in years"),
        registrant_contact: z
          .string()
          .optional()
          .describe("Contact ID to use as registrant"),
        currency: z
          .string()
          .optional()
          .describe("Currency for payment (e.g., 'USD')"),
        coupon: z.string().optional().describe("Coupon code for discount"),
      },
      async ({ domain, duration, registrant_contact, currency, coupon }) => {
        try {
          const result = await client.register(domain, duration, {
            registrantContact: registrant_contact,
            currency,
            coupon,
          });
          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: `Domain registration failed: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );

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