Skip to main content
Glama

whmcs_get_support_statuses

Retrieve ticket statuses and their counts from WHMCS support system. Filter results by department ID to monitor support workflow and identify bottlenecks.

Instructions

Get ticket statuses with counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deptidNoFilter by department ID

Implementation Reference

  • src/index.ts:568-582 (registration)
    Registration of the 'whmcs_get_support_statuses' tool in the MCP server, including input schema (deptid optional), title, description, and thin async handler that delegates to WhmcsApiClient.getSupportStatuses and formats the JSON response.
    'whmcs_get_support_statuses', { title: 'Get Support Statuses', description: 'Get ticket statuses with counts', inputSchema: { deptid: z.number().optional().describe('Filter by department ID'), }, }, async (params) => { const result = await whmcsClient.getSupportStatuses(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
  • Core handler implementation in WhmcsApiClient: getSupportStatuses method that performs the actual WHMCS API call to action='GetSupportStatuses' with optional deptid parameter, returning statuses array with title, count, and color.
    /** * Get ticket statuses */ async getSupportStatuses(params: { deptid?: number } = {}) { return this.call<WhmcsApiResponse & { totalresults: number; statuses: { status: Array<{ title: string; count: number; color: string; }> }; }>('GetSupportStatuses', params); }
  • Input schema definition for the tool using Zod: optional deptid (number) to filter statuses by department.
    inputSchema: { deptid: z.number().optional().describe('Filter by department ID'), },
  • Related MCP resource 'whmcs-ticket-statuses' at whmcs://support/statuses that uses getSupportStatuses to provide ticket statuses as a JSON resource.
    'whmcs-ticket-statuses', 'whmcs://support/statuses', { title: 'Ticket Statuses', description: 'Available support ticket statuses', mimeType: 'application/json', }, async (uri) => { try { const statuses = await whmcsClient.getSupportStatuses({}); return { contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify(statuses, null, 2), }], }; } catch (error) { return { contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify({ error: 'Failed to fetch ticket statuses' }), }], }; } }

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/scarecr0w12/whmcs-mcp-server'

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