buy_expired_domain
Browse and purchase expired closeout domains at discounted prices through the Dynadot MCP server. Use to find available domains or buy specific ones.
Instructions
Browse and purchase expired closeout domains at discounted prices. Use action 'list' to see available domains or 'buy' to purchase one.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: 'list' available expired domains or 'buy' one | |
| domain | No | Domain name to buy (required for 'buy') | |
| currency | No | Currency for the purchase | |
| params | No | Additional filter parameters for 'list' |
Implementation Reference
- src/tools/marketplace.ts:348-403 (handler)The `buy_expired_domain` tool is registered and implemented within `src/tools/marketplace.ts`. It takes `action`, `domain`, `currency`, and `params` as inputs and delegates to `client.getExpiredCloseoutDomains` (for list) or `client.buyExpiredCloseoutDomain` (for buy).
server.tool( "buy_expired_domain", "Browse and purchase expired closeout domains at discounted prices. " + "Use action 'list' to see available domains or 'buy' to purchase one.", { action: z .enum(["list", "buy"]) .describe("Action: 'list' available expired domains or 'buy' one"), domain: z .string() .optional() .describe("Domain name to buy (required for 'buy')"), currency: z .string() .optional() .describe("Currency for the purchase"), params: z .record(z.string()) .optional() .describe("Additional filter parameters for 'list'"), }, async ({ action, domain, currency, params }) => { try { if (action === "list") { const result = await client.getExpiredCloseoutDomains(params); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } if (!domain) { return { content: [ { type: "text" as const, text: "domain is required for 'buy'" }, ], isError: true, }; } const result = await client.buyExpiredCloseoutDomain(domain, currency); 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: `Expired domain operation failed: ${msg}` }, ], isError: true, }; } } );