Renew Domain
whmcs_renew_domainRenew a domain by sending a renewal command to the registrar using the domain ID.
Instructions
Send domain renewal command to registrar
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domainid | Yes | Domain ID |
Implementation Reference
- src/index.ts:642-657 (registration)Tool registration for 'whmcs_renew_domain' in the MCP server. Defines the tool name, description, input schema (accepting domainid), and the handler that delegates to whmcsClient.renewDomain().
server.registerTool( 'whmcs_renew_domain', { title: 'Renew Domain', description: 'Send domain renewal command to registrar', inputSchema: { domainid: z.number().describe('Domain ID'), }, }, async (params) => { const result = await whmcsClient.renewDomain(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/whmcs-client.ts:844-848 (handler)The actual implementation logic in the WHMCS API client. The renewDomain method takes a domainid parameter and calls the WHMCS 'DomainRenew' API action via the generic call() method.
async renewDomain(params: { domainid: number; }) { return this.call<WhmcsApiResponse>('DomainRenew', params); } - src/index.ts:647-649 (schema)Input schema definition for the whmcs_renew_domain tool, specifying a required numeric domainid parameter.
inputSchema: { domainid: z.number().describe('Domain ID'), }, - src/whmcs-client.ts:29-29 (helper)The generic call() method in WhmcsApiClient that handles all WHMCS API requests including DomainRenew. It constructs the request URL, builds form-encoded POST data with authentication credentials, and handles the response.
async call<T extends WhmcsApiResponse>(action: string, params: Record<string, unknown> = {}): Promise<T> {