Skip to main content
Glama

Get Product Groups

whmcs_get_product_groups

Retrieves all product groups from WHMCS to list available categories for further operations.

Instructions

Get all product groups from WHMCS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'whmcs_get_product_groups' tool logic. It calls whmcsClient.getProductGroups() and returns the JSON result.
        async () => {
            const result = await whmcsClient.getProductGroups();
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Input schema for the tool. It defines 'whmcs_get_product_groups' with an empty input schema (no parameters required).
    'whmcs_get_product_groups',
    {
        title: 'Get Product Groups',
        description: 'Get all product groups from WHMCS',
        inputSchema: {},
  • src/index.ts:239-252 (registration)
    Registration of the 'whmcs_get_product_groups' tool via server.registerTool() with name, metadata, and handler.
    server.registerTool(
        'whmcs_get_product_groups',
        {
            title: 'Get Product Groups',
            description: 'Get all product groups from WHMCS',
            inputSchema: {},
        },
        async () => {
            const result = await whmcsClient.getProductGroups();
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • The getProductGroups() method on WhmcsApiClient that calls the WHMCS API 'GetProductGroups' action and returns the typed response with product groups data.
    /**
     * Get product groups
     */
    async getProductGroups() {
        return this.call<WhmcsApiResponse & {
            totalresults: number;
            productgroups: { productgroup: Array<{
                id: number;
                name: string;
                headline: string;
                tagline: string;
                orderfrmtpl: string;
            }> };
        }>('GetProductGroups');
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states 'Get all product groups', which implies a read operation, but does not disclose any behavioral traits like pagination, rate limits, or data freshness.

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

Conciseness5/5

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

The description is a single sentence with no wasted words. It is appropriately concise for a simple tool.

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

Completeness3/5

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

Given the tool's simplicity (no params, no output schema), the description is minimally adequate. However, it could mention expected output format or any default behavior to be fully complete.

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

Parameters4/5

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

The tool has zero parameters, so the input schema is trivial. The description adds no parameter information, but none is needed. Baseline 4 applies as coverage is 100% by absence.

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

Purpose4/5

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

The description clearly states the verb 'Get' and resource 'product groups', making the purpose obvious. However, it does not differentiate from sibling tools like whmcs_get_products or whmcs_get_clients, which also retrieve data.

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?

No guidance on when to use this tool vs alternatives. For a simple retrieval tool, it lacks any usage context such as prerequisites or typical scenarios.

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