Skip to main content
Glama

Get Support Departments

whmcs_get_support_departments

Retrieve a list of support departments from WHMCS. Optionally ignore department assignments to fetch all departments.

Instructions

Get list of support departments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ignore_dept_assignmentsNoIgnore department assignments

Implementation Reference

  • src/index.ts:569-584 (registration)
    Registration of the 'whmcs_get_support_departments' tool via server.registerTool with input schema (optional ignore_dept_assignments boolean) and handler calling whmcsClient.getSupportDepartments(params).
    server.registerTool(
        '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) }],
            };
        }
    );
  • Input schema for whmcs_get_support_departments: optional 'ignore_dept_assignments' boolean parameter.
        inputSchema: {
            ignore_dept_assignments: z.boolean().optional().describe('Ignore department assignments'),
        },
    },
  • Handler function that delegates to whmcsClient.getSupportDepartments(params) and returns the JSON-stringified result.
    async (params) => {
        const result = await whmcsClient.getSupportDepartments(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • getSupportDepartments method on WhmcsApiClient - makes the WHMCS API call to 'GetSupportDepartments' with optional ignore_dept_assignments parameter, returns typed response with department list (id, name, awaitingreply, opentickets).
     * Get support departments
     */
    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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey behavioral traits. It only states it returns a list, omitting details like authentication requirements, rate limits, ordering, or what data each department entry contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (5 words) with no redundant information. While it is concise, it could be slightly more structured with additional context without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and annotations, the description is too minimal for a tool among many similar siblings. It does not explain the return format or how this tool fits into common workflows.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the parameter description in the schema is clear. The tool description adds no extra meaning beyond what the schema already provides, so it meets the baseline without adding value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the resource ('list of support departments'). It is specific and distinguishes from sibling tools like whmcs_get_tickets and whmcs_get_support_statuses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. Among many sibling get_* tools, it lacks context on prerequisites, typical use cases, or when not to invoke it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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-tool'

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