Skip to main content
Glama

dynadot_aftermarket

Manage domain aftermarket activities including auctions, backorders, expired domains, and marketplace listings through Dynadot's platform.

Instructions

Aftermarket: auctions, backorders, expired domains, marketplace listings. Browse domains: https://www.dynadot.com/?s9F6L9F7U8Q9U8Z8v

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: backorder_add: Add domain to backorder list | backorder_delete: Remove from backorder list | backorder_list: List backorder requests | auction_list_open: List open auctions | auction_details: Get auction details | auction_bids: Get auction bids | auction_bid: Place auction bid | auction_list_closed: List closed auctions | backorder_auction_list_open: List open backorder auctions | backorder_auction_details: Get backorder auction details | backorder_auction_bid: Place backorder auction bid | backorder_auction_list_closed: List closed backorder auctions | expired_list: List expired closeout domains | expired_buy: Buy expired closeout domain | listings: Get marketplace listings | listing_details: Get listing details | buy_now: Buy domain from marketplace | set_for_sale: List domain for sale | afternic_confirm: Confirm/decline Afternic action | sedo_confirm: Confirm/decline Sedo action
domainNoDomain name (e.g., example.com)
currencyNoCurrency code (default: USD)USD
auctionIdNoAuction ID
bidAmountNoAmount
priceNoAmount

Implementation Reference

  • Handler function that executes the tool logic for dynadot_aftermarket (and other composite tools): determines the action, transforms parameters if needed, removes action param, calls DynadotClient.execute with the schema-defined command, and returns formatted JSON response.
    async (input) => { const action = input.action as string; const actionDef = tool.actions[action]; if (!actionDef) { throw new Error(`Unknown action: ${action}. Valid actions: ${actionKeys.join(', ')}`); } const client = getClient(); const params = actionDef.transform ? actionDef.transform(action, input as Record<string, unknown>) : (input as ApiParams); // Remove 'action' from params sent to API delete params.action; const result = await client.execute(actionDef.command, params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
  • Zod schema definition for the dynadot_aftermarket tool, including description, all actions with their commands, descriptions, input parameters, and transform functions.
    name: 'dynadot_aftermarket', description: `Aftermarket: auctions, backorders, expired domains, marketplace listings. Browse domains: ${DYNADOT_URLS.home}`, actions: { // Backorders backorder_add: { command: 'add_backorder_request', description: 'Add domain to backorder list', params: z.object({ domain: p.domain }), }, backorder_delete: { command: 'delete_backorder_request', description: 'Remove from backorder list', params: z.object({ domain: p.domain }), }, backorder_list: { command: 'backorder_request_list', description: 'List backorder requests', }, // Regular auctions auction_list_open: { command: 'get_open_auctions', description: 'List open auctions', params: z.object({ currency: p.currency.optional() }), }, auction_details: { command: 'get_auction_details', description: 'Get auction details', params: z.object({ auctionId: p.auctionId }), transform: (_, input) => ({ auction_id: input.auctionId as string }), }, auction_bids: { command: 'get_auction_bids', description: 'Get auction bids', params: z.object({ auctionId: p.auctionId }), transform: (_, input) => ({ auction_id: input.auctionId as string }), }, auction_bid: { command: 'place_auction_bid', description: 'Place auction bid', params: z.object({ auctionId: p.auctionId, bidAmount: p.amount, currency: p.currency.optional(), }), transform: (_, input) => ({ auction_id: input.auctionId as string, bid_amount: input.bidAmount as number, currency: (input.currency as string) || 'USD', }), }, auction_list_closed: { command: 'get_closed_auctions', description: 'List closed auctions', }, // Backorder auctions backorder_auction_list_open: { command: 'get_open_backorder_auctions', description: 'List open backorder auctions', params: z.object({ currency: p.currency.optional() }), }, backorder_auction_details: { command: 'get_backorder_auction_details', description: 'Get backorder auction details', params: z.object({ auctionId: p.auctionId }), transform: (_, input) => ({ auction_id: input.auctionId as string }), }, backorder_auction_bid: { command: 'place_backorder_auction_bid', description: 'Place backorder auction bid', params: z.object({ auctionId: p.auctionId, bidAmount: p.amount }), transform: (_, input) => ({ auction_id: input.auctionId as string, bid_amount: input.bidAmount as number, }), }, backorder_auction_list_closed: { command: 'get_closed_backorder_auctions', description: 'List closed backorder auctions', }, // Expired closeouts expired_list: { command: 'get_expired_closeout_domains', description: 'List expired closeout domains', params: z.object({ currency: p.currency.optional() }), }, expired_buy: { command: 'buy_expired_closeout_domain', description: 'Buy expired closeout domain', params: z.object({ domain: p.domain, currency: p.currency.optional() }), }, // Marketplace listings: { command: 'get_listings', description: 'Get marketplace listings', params: z.object({ currency: p.currency.optional() }), }, listing_details: { command: 'get_listing_item', description: 'Get listing details', params: z.object({ domain: p.domain }), }, buy_now: { command: 'buy_it_now', description: 'Buy domain from marketplace', params: z.object({ domain: p.domain, currency: p.currency.optional() }), }, set_for_sale: { command: 'set_for_sale', description: 'List domain for sale', params: z.object({ domain: p.domain, price: p.amount, currency: p.currency.optional() }), }, // Marketplace confirmations afternic_confirm: { command: 'set_afternic_confirm_action', description: 'Confirm/decline Afternic action', params: z.object({ domain: p.domain, action: p.confirmAction }), }, sedo_confirm: { command: 'set_sedo_confirm_action', description: 'Confirm/decline Sedo action', params: z.object({ domain: p.domain, action: p.confirmAction }), }, }, },
  • src/register.ts:6-65 (registration)
    Registration function that dynamically builds input schema from actions and registers the dynadot_aftermarket tool (and others) with MCP server using the handler.
    export function registerAllTools(server: McpServer): void { for (const tool of compositeTools) { // Build action enum from keys const actionKeys = Object.keys(tool.actions) as [string, ...string[]]; // Build combined input schema with action + all possible params const actionDescriptions = actionKeys .map((k) => { const actionDef = tool.actions[k]; return actionDef ? `${k}: ${actionDef.description}` : k; }) .join(' | '); const inputSchema: Record<string, z.ZodTypeAny> = { action: z.enum(actionKeys).describe(`Action to perform: ${actionDescriptions}`), }; // Collect all unique params across actions for (const action of Object.values(tool.actions)) { if (action?.params) { const shape = action.params.shape; for (const [key, schema] of Object.entries(shape)) { if (!inputSchema[key]) { // Make optional since not all actions need all params inputSchema[key] = (schema as z.ZodTypeAny).optional(); } } } } server.registerTool( tool.name, { description: tool.description, inputSchema, }, async (input) => { const action = input.action as string; const actionDef = tool.actions[action]; if (!actionDef) { throw new Error(`Unknown action: ${action}. Valid actions: ${actionKeys.join(', ')}`); } const client = getClient(); const params = actionDef.transform ? actionDef.transform(action, input as Record<string, unknown>) : (input as ApiParams); // Remove 'action' from params sent to API delete params.action; const result = await client.execute(actionDef.command, params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); } }
  • DynadotClient.execute method: the core helper that performs the actual API call for the schema-defined command using GET to api3.json with API key and params.
    async execute(command: string, params: ApiParams = {}): Promise<ApiResponse> { const searchParams = new URLSearchParams(); searchParams.set('key', this.apiKey); searchParams.set('command', command); for (const [key, value] of Object.entries(params)) { if (value !== undefined) { searchParams.set(key, String(value)); } } const response = await this.client.get('api3.json', { searchParams }).json<ApiResponse>(); if (response.Status === 'error') { throw new Error(`Dynadot API error: ${response.Error || 'Unknown error'}`); } return response; }

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/joachimBrindeau/domain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server