Skip to main content
Glama

whm_terminate_account

Permanently delete a cPanel account and all its data from a WHM server. Requires confirmation to avoid accidental removal.

Instructions

⚠️ PERMANENTLY DELETE a cPanel account and all its data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias from accounts.json (use list_accounts to see options)
usernameYes
confirmYesMust be true to confirm deletion

Implementation Reference

  • src/tools.py:149-161 (registration)
    Registration of the 'whm_terminate_account' tool with schema requiring 'account', 'username', and 'confirm' (boolean) parameters. Description warns it permanently deletes a cPanel account and all its data.
    Tool(
        name="whm_terminate_account",
        description="⚠️ PERMANENTLY DELETE a cPanel account and all its data",
        inputSchema={
            "type": "object",
            "properties": {
                **ACCOUNT_PARAM,
                "username": {"type": "string"},
                "confirm": {"type": "boolean", "description": "Must be true to confirm deletion"}
            },
            "required": ["account", "username", "confirm"]
        }
    ),
  • Handler for whm_terminate_account. Checks if 'confirm' is truthy; if not, returns error. Otherwise calls the WHM 'removeacct' API endpoint with the username parameter to permanently delete the account.
    case "whm_terminate_account":
        if not args.get("confirm"):
            return {"error": "You must set confirm=true to permanently delete an account. This is irreversible."}
        return await _get(client, url("removeacct"), headers, {"user": args["username"]})
  • Shared helper that constructs WHM API Authorization headers using the account token and user.
    def _headers(account: dict) -> dict:
        token = account["token"]
        user = account.get("user", "root")
        return {
            "Authorization": f"whm {user}:{token}",
            "Content-Type": "application/json"
        }
  • Shared async HTTP GET helper used to make the API call to WHM's removeacct endpoint.
    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)}
  • src/server.py:47-69 (registration)
    Server call_tool handler that dispatches 'whm_*' tools to handle_whm_tool, which routes to the whm_terminate_account case.
    @app.call_tool()
    async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
        log.info(f"Tool called: {name} | Args: {json.dumps(arguments)}")
    
        if name == "list_accounts":
            accounts = load_accounts()
            result = [
                {"alias": a, "host": cfg["host"], "type": cfg.get("type","whm")}
                for a, cfg in accounts.items()
            ]
            return [TextContent(type="text", text=json.dumps(result, indent=2))]
    
        account_alias = arguments.get("account")
        if not account_alias:
            return [TextContent(type="text", text="ERROR: 'account' parameter is required. Use list_accounts to see available accounts.")]
    
        account = get_account(account_alias)
        if not account:
            return [TextContent(type="text", text=f"ERROR: Account '{account_alias}' not found. Use list_accounts to see configured accounts.")]
    
        async with httpx.AsyncClient(verify=False, timeout=30) as client:
            if name.startswith("whm_"):
                result = await handle_whm_tool(client, account, name, arguments)
Behavior3/5

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

The description warns of permanent deletion and data loss, but does not disclose additional behaviors like the need for confirmation (though confirm parameter is in schema), irreversibility, or what happens to associated resources. Lacks details beyond the basic destructive nature.

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?

Single sentence with an emoji warning conveys the essence immediately. No fluff, well front-loaded.

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?

For a destructive tool with no annotations and no output schema, the description is minimal. It does not explain return values, prerequisites (e.g., account existence), or side effects beyond data loss. Could include more context like requiring confirmation or suspending first.

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 67% (account and confirm have descriptions, username does not). The tool description adds no extra meaning beyond schema; account description already references list_accounts, confirm description already states must be true. Username remains undocumented.

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 uses strong verbs 'PERMANENTLY DELETE' and specifies the resource 'a cPanel account and all its data', distinguishing it from sibling tools like whm_suspend_account (temporary suspension) or whm_create_account.

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 permanent deletion but provides no explicit guidance on when to use this tool vs alternatives (e.g., when to suspend vs delete). No scenario or prerequisite information is given.

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