list_coupons
Retrieve available coupon codes for your Dynadot account to apply discounts on domain registrations and other services.
Instructions
List all available coupon codes on the account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/account.ts:200-212 (handler)The handler implementation for the list_coupons tool.
async () => { try { const result = await client.listCoupons(); 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 list coupons: ${msg}` }, - src/tools/account.ts:196-200 (registration)Registration of the list_coupons tool.
server.tool( "list_coupons", "List all available coupon codes on the account.", {}, async () => { - Helper method to call the Dynadot API for listing coupons.
async listCoupons(): Promise<DynadotResponse> { return this.call("list_coupons"); }