Skip to main content
Glama

dynadot_order

Manage domain orders and related operations through Dynadot, including checking order status, listing available coupons, and handling reseller verification.

Instructions

Orders, coupons, processing status, reseller operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: list: List recent orders | status: Get order status | is_processing: Check if operations pending | coupons: List available coupons | reseller_verification: Set reseller WHOIS verification status
orderIdNoOrder ID
contactIdNoContact ID
statusNo

Implementation Reference

  • Schema definition for the 'dynadot_order' MCP tool, defining input schema, actions, and their corresponding Dynadot API commands.
    name: 'dynadot_order', description: 'Orders, coupons, processing status, reseller operations', actions: { list: { command: 'order_list', description: 'List recent orders', }, status: { command: 'get_order_status', description: 'Get order status', params: z.object({ orderId: p.orderId }), transform: (_, input) => ({ order_id: input.orderId as string }), }, is_processing: { command: 'is_processing', description: 'Check if operations pending', }, coupons: { command: 'list_coupons', description: 'List available coupons', }, reseller_verification: { command: 'set_reseller_contact_whois_verification_status', description: 'Set reseller WHOIS verification status', params: z.object({ contactId: p.contactId, status: z.enum(['verified', 'unverified']), }), transform: (_, input) => ({ contact_id: input.contactId as string, status: input.status as string, }), }, }, },
  • Generic handler for all composite tools including 'dynadot_order'. Determines action from input, transforms params if needed, calls Dynadot API via client.execute, and returns JSON response.
    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) }], }; }
  • src/register.ts:6-65 (registration)
    Registers all composite tools from schema.ts, including 'dynadot_order', with the MCP server using dynamically generated input schemas and shared 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) }], }; } ); } }
  • Core API execution helper used by the tool handler to call Dynadot API endpoints for commands like 'order_list', 'get_order_status', etc.
    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; }
  • src/index.ts:63-72 (registration)
    Initializes MCP server and calls registerAllTools to register 'dynadot_order' tool.
    const server = new McpServer({ name: 'domain-mcp', version: packageJson.version, }); registerAllTools(server); const transport = new StdioServerTransport(); await server.connect(transport);

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