get_tld_price
Retrieve pricing details for top-level domains including registration, renewal, and transfer costs from the Dynadot registrar API.
Instructions
Get pricing information for TLDs (top-level domains). Returns registration, renewal, and transfer prices.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | Currency for pricing (e.g., 'USD', 'EUR') | |
| count_per_page | No | Number of results per page | |
| page_index | No | Page index (0-based) |
Implementation Reference
- src/services/dynadot-client.ts:534-544 (handler)Implementation of the TLD price lookup service method.
async getTldPrice(options?: { currency?: string; countPerPage?: number; pageIndex?: number; }): Promise<DynadotResponse> { const params: Record<string, string> = {}; if (options?.currency) params.currency = options.currency; if (options?.countPerPage) params.count_per_page = options.countPerPage.toString(); if (options?.pageIndex) params.page_index = options.pageIndex.toString(); return this.call("tld_price", params); } - src/tools/account.ts:222-265 (registration)MCP tool registration for 'get_tld_price' which handles input validation and calls the service method.
server.tool( "get_tld_price", "Get pricing information for TLDs (top-level domains). Returns registration, " + "renewal, and transfer prices.", { currency: z .string() .optional() .describe("Currency for pricing (e.g., 'USD', 'EUR')"), count_per_page: z .number() .int() .optional() .describe("Number of results per page"), page_index: z .number() .int() .optional() .describe("Page index (0-based)"), }, async ({ currency, count_per_page, page_index }) => { try { const result = await client.getTldPrice({ currency, countPerPage: count_per_page, pageIndex: page_index, }); 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 get TLD prices: ${msg}` }, ], isError: true, }; } } ); }