Skip to main content
Glama

whm_list_accounts

Retrieve a list of all cPanel accounts on your WHM server, including disk usage, domain, and account status.

Instructions

List all cPanel accounts on this WHM server with disk usage, domain, status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias from accounts.json (use list_accounts to see options)

Implementation Reference

  • Handler for whm_list_accounts: calls WHM JSON API 'listaccts' endpoint via HTTP GET.
    case "whm_list_accounts":
        return await _get(client, url("listaccts"), headers)
  • Schema definition / registration of whm_list_accounts tool with its input schema (requires 'account' param).
    Tool(
        name="whm_list_accounts",
        description="List all cPanel accounts on this WHM server with disk usage, domain, status",
        inputSchema={
            "type": "object",
            "properties": {**ACCOUNT_PARAM},
            "required": ["account"]
        }
    ),
  • src/server.py:36-42 (registration)
    Tool registration: whm_tools() is called in the list_tools handler to register all WHM tools including whm_list_accounts.
    all_tools = []
    all_tools.append(Tool(
        name="list_accounts",
        description="List all configured WHM/cPanel server accounts available in this MCP",
        inputSchema={"type": "object", "properties": {}, "required": []}
    ))
    all_tools.extend(whm_tools())
  • src/server.py:67-69 (registration)
    Dispatch: call_tool routes whm_ prefixed tools to handle_whm_tool which handles whm_list_accounts.
    async with httpx.AsyncClient(verify=False, timeout=30) as client:
        if name.startswith("whm_"):
            result = await handle_whm_tool(client, account, name, arguments)
  • Helper function _whm_url builds the WHM JSON API URL for a given function (e.g., 'listaccts').
    def _whm_url(account: dict, function: str) -> str:
        host = account["host"]
        port = account.get("port", 2087)
        user = account.get("user", "root")
        return f"https://{host}:{port}/json-api/{function}?api.version=1"
Behavior2/5

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

No annotations provided. The description does not clarify that the tool requires an account parameter, nor does it specify read-only nature or output structure. The mismatch between 'list all' and required parameter is a significant omission.

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

Conciseness2/5

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

The description is a single sentence, but it omits critical information about the required parameter, making it under-specified. Conciseness should not sacrifice completeness.

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?

For a simple tool with one parameter and no output schema, the description is incomplete. It fails to explain the apparent contradiction between listing all accounts and requiring an account filter, and lacks any mention of output format or edge cases.

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 description coverage is 100% (account parameter has a description). The tool description adds no additional semantic value beyond the schema, so baseline 3 is appropriate.

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 tool lists all cPanel accounts with specific fields (disk usage, domain, status), differentiating it from siblings like whm_account_summary or list_accounts.

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. The description claims to list all accounts but the input schema requires an account parameter, which is confusing and not addressed.

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/manofsadness/ItchWHMMCP'

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