Skip to main content
Glama

whm_account_summary

Retrieve disk, bandwidth, email, and database details for a specific cPanel account to assess resource usage.

Instructions

Get detailed summary for a specific cPanel account (disk, bandwidth, emails, DBs)

Input Schema

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

Implementation Reference

  • src/tools.py:63-94 (registration)
    Registration of whm_account_summary tool in the whm_tools() function. Defines name, description, and inputSchema requiring 'account' and 'username' (cPanel username).
    def whm_tools() -> list[Tool]:
        return [
            Tool(
                name="whm_server_info",
                description="Get WHM server information: hostname, OS, cPanel version, load, uptime",
                inputSchema={
                    "type": "object",
                    "properties": ACCOUNT_PARAM,
                    "required": ["account"]
                }
            ),
            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"]
                }
            ),
            Tool(
                name="whm_account_summary",
                description="Get detailed summary for a specific cPanel account (disk, bandwidth, emails, DBs)",
                inputSchema={
                    "type": "object",
                    "properties": {
                        **ACCOUNT_PARAM,
                        "username": {"type": "string", "description": "cPanel username to inspect"}
                    },
                    "required": ["account", "username"]
                }
            ),
  • Handler for whm_account_summary inside handle_whm_tool(). Calls WHM JSON API 'accountsummary' with the 'username' argument passed as 'user' query parameter.
    case "whm_account_summary":
        return await _get(client, url("accountsummary"), headers, {"user": args["username"]})
  • Helper _whm_url() constructs the WHM JSON API URL used by the handler to call the 'accountsummary' endpoint.
    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"
  • Helper _get() performs the async HTTP GET request that the handler uses to fetch data from the WHM API.
    async def _get(client: httpx.AsyncClient, url: str, headers: dict, params: dict = None) -> dict:
        try:
            r = await client.get(url, headers=headers, params=params or {})
            r.raise_for_status()
            return r.json()
        except Exception as e:
            return {"error": str(e)}
  • Helper _headers() constructs the Authorization header with the WHM token, used by the handler.
    def _headers(account: dict) -> dict:
        token = account["token"]
        user = account.get("user", "root")
        return {
            "Authorization": f"whm {user}:{token}",
            "Content-Type": "application/json"
        }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not explicitly state that the operation is read-only, nor does it mention any side effects, authentication requirements, or rate limits. The safe nature is implied but not confirmed.

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, well-structured sentence that front-loads the core purpose. Every part is necessary, with no redundant or extraneous information.

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

Completeness4/5

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

Given the lack of an output schema, the description outlines the key data categories (disk, bandwidth, emails, DBs), which provides enough context for the agent to understand the return value. However, it does not describe the format or any pagination/limitations.

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 input schema has 100% coverage. The description adds value beyond the schema by explaining the 'account' parameter refers to an alias from accounts.json and suggests using list_accounts to see options. The 'username' parameter is straightforward but adequately described.

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 gets a detailed summary for a specific cPanel account, listing the covered aspects (disk, bandwidth, emails, DBs). It uses a specific verb-resource combination and distinguishes from sibling tools that focus on individual aspects like cpanel_disk_usage or whm_bandwidth_usage.

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?

The description implies the tool is for obtaining a comprehensive account summary, but it does not explicitly state when to use it over other tools like list_accounts or whm_list_accounts. No exclusions or alternative guidance are provided.

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