Skip to main content
Glama

Get Servers

whmcs_get_servers

Retrieve a list of configured servers from WHMCS, with optional status fetching.

Instructions

Get list of configured servers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fetchStatusNoFetch server status

Implementation Reference

  • src/index.ts:890-905 (registration)
    The tool 'whmcs_get_servers' is registered using server.registerTool() with input schema accepting an optional 'fetchStatus' boolean parameter.
    server.registerTool(
        'whmcs_get_servers',
        {
            title: 'Get Servers',
            description: 'Get list of configured servers',
            inputSchema: {
                fetchStatus: z.boolean().optional().describe('Fetch server status'),
            },
        },
        async (params) => {
            const result = await whmcsClient.getServers(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • The handler function for 'whmcs_get_servers' calls whmcsClient.getServers(params) and returns the result as JSON text.
        async (params) => {
            const result = await whmcsClient.getServers(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Input schema defining the 'fetchStatus' optional boolean parameter for the whmcs_get_servers tool.
    {
        title: 'Get Servers',
        description: 'Get list of configured servers',
        inputSchema: {
            fetchStatus: z.boolean().optional().describe('Fetch server status'),
        },
    },
  • The getServers() method in WhmcsApiClient class that calls the WHMCS API 'GetServers' action and defines the response type with server list including id, name, hostname, ipaddress, assignedips, active, disabled, type, maxaccounts, statusaddress, and nameserver fields.
    /**
     * Get servers
     */
    async getServers(params: {
        fetchStatus?: boolean;
    } = {}) {
        return this.call<WhmcsApiResponse & {
            totalresults: number;
            servers: { server: Array<{
                id: number;
                name: string;
                hostname: string;
                ipaddress: string;
                assignedips: string;
                active: boolean;
                disabled: boolean;
                type: string;
                maxaccounts: number;
                statusaddress: string;
                ns1: string;
                ns1ip: string;
                ns2: string;
                ns2ip: string;
                ns3: string;
                ns3ip: string;
                ns4: string;
                ns4ip: string;
            }> };
        }>('GetServers', params);
    }
Behavior2/5

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

No annotations provided, yet description only states purpose without disclosing any behavioral traits (e.g., idempotency, performance, authentication). With no annotations, the description carries the burden but provides minimal insight.

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?

Single sentence is concise and front-loaded. No unnecessary words; earns its place.

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?

No output schema, yet description does not mention return format or behavior. For a list tool, it could be more complete, especially given the rich sibling context (many tools have more detailed descriptions).

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% with one boolean parameter 'fetchStatus' described as 'Fetch server status'. Description adds no further meaning beyond what the schema already provides, so baseline 3 is appropriate.

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?

Description clearly states 'Get list of configured servers' with specific verb and resource. Distinguishable from many get_* siblings because it targets servers specifically.

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

Usage Guidelines3/5

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

No explicit when-to-use or alternatives guidance, but for a simple list retrieval tool the context is implied. Basic usage is clear.

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