Skip to main content
Glama

whmcs_get_support_departments

Retrieve support department listings from WHMCS to manage ticket routing and organizational structure.

Instructions

Get list of support departments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ignore_dept_assignmentsNoIgnore department assignments

Implementation Reference

  • src/index.ts:551-565 (registration)
    Registration of the 'whmcs_get_support_departments' MCP tool. Defines the tool name, title, description, input schema using Zod, and the handler function that calls whmcsClient.getSupportDepartments() and formats the response.
    'whmcs_get_support_departments', { title: 'Get Support Departments', description: 'Get list of support departments', inputSchema: { ignore_dept_assignments: z.boolean().optional().describe('Ignore department assignments'), }, }, async (params) => { const result = await whmcsClient.getSupportDepartments(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
  • Core handler implementation in WhmcsApiClient class. Makes authenticated API call to WHMCS 'GetSupportDepartments' action with provided params, returning departments list with counts of open/awaiting tickets.
    async getSupportDepartments(params: { ignore_dept_assignments?: boolean } = {}) { return this.call<WhmcsApiResponse & { totalresults: number; departments: { department: Array<{ id: number; name: string; awaitingreply: number; opentickets: number; }> }; }>('GetSupportDepartments', params); }
  • Zod input schema for the tool, defining optional 'ignore_dept_assignments' boolean parameter.
    inputSchema: { ignore_dept_assignments: z.boolean().optional().describe('Ignore department assignments'), },
  • TypeScript type definition for the expected response from WHMCS GetSupportDepartments API, including totalresults and array of departments with id, name, and ticket counts.
    return this.call<WhmcsApiResponse & { totalresults: number; departments: { department: Array<{ id: number; name: string; awaitingreply: number; opentickets: number; }> }; }>('GetSupportDepartments', params);

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