Skip to main content
Glama

cpanel_email_list

List all email accounts for a cPanel user's domain.

Instructions

List all email accounts for a cPanel user's domain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias from accounts.json (use list_accounts to see options)
cpanel_userYescPanel username
domainYesDomain to list emails for

Implementation Reference

  • src/server.py:42-43 (registration)
    The tool 'cpanel_email_list' is registered via cpanel_tools() which is called in list_tools() on line 43, adding all cPanel tool definitions to the server.
    all_tools.extend(whm_tools())
    all_tools.extend(cpanel_tools())
  • src/tools.py:43-47 (registration)
    The call_tool() handler routes tools starting with 'cpanel_' to handle_cpanel_tool() on line 71.
    async def _post(client: httpx.AsyncClient, url: str, headers: dict, data: dict = None) -> dict:
        try:
            r = await client.post(url, headers=headers, json=data or {})
            r.raise_for_status()
            return r.json()
  • Tool definition for 'cpanel_email_list' with inputSchema requiring 'account', 'cpanel_user', and 'domain'.
    Tool(
        name="cpanel_email_list",
        description="List all email accounts for a cPanel user's domain",
        inputSchema={
            "type": "object",
            "properties": {
                **ACCOUNT_PARAM,
                "cpanel_user": {"type": "string", "description": "cPanel username"},
                "domain": {"type": "string", "description": "Domain to list emails for"}
            },
            "required": ["account", "cpanel_user", "domain"]
        }
    ),
  • Handler for 'cpanel_email_list': calls cPanel UAPI 'Email/list_pops' with the provided 'domain' parameter.
    case "cpanel_email_list":
        return await _get(client, url("Email", "list_pops"), headers, {"domain": args.get("domain", "")})
  • Helper function _cpanel_url builds the WHM-proxied UAPI URL used by the cpanel_email_list handler to reach the cPanel API.
    def _cpanel_url(account: dict, module: str, function: str, cpanel_user: str = None) -> str:
        host = account["host"]
        port = account.get("port", 2087)
        # WHM-proxied UAPI call on behalf of a cPanel user
        user = cpanel_user or account.get("cpanel_user", "")
        return f"https://{host}:{port}/json-api/cpanel?api.version=1&cpanel_jsonapi_user={user}&cpanel_jsonapi_module={module}&cpanel_jsonapi_func={function}&cpanel_jsonapi_apiversion=3"
Behavior3/5

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

Without annotations, the description carries full burden. It implies read-only behavior but does not explicitly state that no modifications occur. For a simple list tool, this is adequate but minimal; additional detail about safety would be beneficial.

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 no unnecessary words. Purpose is immediately clear, demonstrating excellent conciseness and front-loading.

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 tool's simplicity and absence of output schema, the description is nearly complete. It could hint at return format (e.g., list of account details) but is sufficient for an AI agent to understand its basic function.

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?

Input schema covers all three parameters with descriptions, achieving 100% coverage. The description adds no extra meaning beyond the schema, so baseline score of 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 states a clear verb ('List') and resource ('all email accounts for a cPanel user's domain'), effectively distinguishing it from sibling tools like cpanel_email_create or cpanel_forwarders_list.

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 versus alternatives, nor any mention of prerequisites or context such as needing cPanel access. The description only states what it does, not when it's appropriate.

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