Module Suspend
whmcs_module_suspendSuspend a WHMCS service account by providing the service ID. Optionally include a suspension reason.
Instructions
Suspend a service account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountid | Yes | Service ID | |
| suspendreason | No | Suspension reason |
Implementation Reference
- src/index.ts:928-944 (registration)Registration of the 'whmcs_module_suspend' tool with the MCP server. Defines its title, description, and inputSchema (accountid required, suspendreason optional). The handler delegates to whmcsClient.moduleSuspend().
server.registerTool( 'whmcs_module_suspend', { title: 'Module Suspend', description: 'Suspend a service account', inputSchema: { accountid: z.number().describe('Service ID'), suspendreason: z.string().optional().describe('Suspension reason'), }, }, async (params) => { const result = await whmcsClient.moduleSuspend(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/whmcs-client.ts:1118-1123 (handler)Implementation of the moduleSuspend method in WhmcsApiClient. Accepts accountid and optional suspendreason, then calls the WHMCS API action 'ModuleSuspend'.
async moduleSuspend(params: { accountid: number; suspendreason?: string; }) { return this.call<WhmcsApiResponse>('ModuleSuspend', params); } - src/index.ts:933-936 (schema)Zod schema defining the input parameters for whmcs_module_suspend: accountid (required number) and suspendreason (optional string).
inputSchema: { accountid: z.number().describe('Service ID'), suspendreason: z.string().optional().describe('Suspension reason'), },