Skip to main content
Glama

renew_domain

Extend domain registration periods through Dynadot's API. Specify domain name and renewal duration in years, optionally apply discount coupons, or check pricing before committing.

Instructions

Renew an existing domain registration. Duration is in years.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to renew
durationYesRenewal duration in years
couponNoCoupon code for discount
price_checkNoOnly check the renewal price without renewing

Implementation Reference

  • The handler for the renew_domain tool, which defines the tool's input schema and calls the DynadotClient.renewDomain method.
    server.tool(
      "renew_domain",
      "Renew an existing domain registration. Duration is in years.",
      {
        domain: z.string().describe("Domain name to renew"),
        duration: z
          .number()
          .int()
          .min(1)
          .max(10)
          .describe("Renewal duration in years"),
        coupon: z.string().optional().describe("Coupon code for discount"),
        price_check: z
          .boolean()
          .optional()
          .describe("Only check the renewal price without renewing"),
      },
      async ({ domain, duration, coupon, price_check }) => {
        try {
          const result = await client.renewDomain(domain, duration, {
            coupon,
            priceCheck: price_check,
          });
          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 renewal failed: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );
  • The DynadotClient method that performs the API call to renew a domain.
    async renewDomain(domain: string, duration: number, options?: {
      coupon?: string;
      priceCheck?: boolean;
    }): Promise<DynadotResponse> {
      const params: Record<string, string> = {
        domain,
        duration: duration.toString(),
      };
      if (options?.coupon) params.coupon = options.coupon;
      if (options?.priceCheck) params.price_check = "1";
      return this.call("renew", 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