whmcs_register_domain
Register a domain name by sending the registration command to the registrar using the domain ID and domain name.
Instructions
Send domain registration command to registrar
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domainid | No | Domain ID | |
| domain | No | Domain name |
Implementation Reference
- src/whmcs-client.ts:812-817 (handler)Implements the tool handler by invoking the WHMCS 'DomainRegister' API action via the generic call method, passing domainid or domain as parameters.async registerDomain(params: { domainid?: number; domain?: string; }) { return this.call<WhmcsApiResponse>('DomainRegister', params); }
- src/index.ts:593-597 (schema)Zod schema for tool inputs: optional domainid (number) and domain (string). Used for input validation in the MCP tool registration.inputSchema: { domainid: z.number().optional().describe('Domain ID'), domain: z.string().optional().describe('Domain name'), }, },
- src/index.ts:588-604 (registration)MCP server tool registration for 'whmcs_register_domain', including title, description, input schema, and async handler that calls whmcsClient.registerDomain and formats response as JSON text.server.registerTool( 'whmcs_register_domain', { title: 'Register Domain', description: 'Send domain registration command to registrar', inputSchema: { domainid: z.number().optional().describe('Domain ID'), domain: z.string().optional().describe('Domain name'), }, }, async (params) => { const result = await whmcsClient.registerDomain(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );