Skip to main content
Glama

cpanel_forwarders_list

Retrieve all email forwarders configured for a domain in cPanel. Specify account, cPanel user, and domain to get the list.

Instructions

List all email forwarders for a cPanel user's domain

Input Schema

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

Implementation Reference

  • Handler for the cpanel_forwarders_list tool. Calls cPanel UAPI Email::list_forwarders with the domain argument.
    case "cpanel_forwarders_list":
        return await _get(client, url("Email", "list_forwarders"), headers, {"domain": args.get("domain", "")})
  • Tool registration with input schema for cpanel_forwarders_list. Requires: account, cpanel_user, domain.
    Tool(
        name="cpanel_forwarders_list",
        description="List all email forwarders for a cPanel user's domain",
        inputSchema={
            "type": "object",
            "properties": {
                **ACCOUNT_PARAM,
                "cpanel_user": {"type": "string"},
                "domain": {"type": "string"}
            },
            "required": ["account", "cpanel_user", "domain"]
        }
  • src/server.py:34-44 (registration)
    Tools are registered via list_tools() which calls cpanel_tools() (defined in src/tools.py) to collect all cpanel tool definitions.
    @app.list_tools()
    async def list_tools() -> list[Tool]:
        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())
        all_tools.extend(cpanel_tools())
        return all_tools
  • Helper _cpanel_url constructs the WHM-proxied UAPI URL used to call Email::list_forwarders.
    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"
  • Helper _get is the async HTTP GET function used to execute the API call for list_forwarders.
    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)}
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states the purpose without disclosing behavioral traits like read-only nature, permissions needed, or potential response size.

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 with no fluff. Efficient, but could include a brief usage note.

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?

Adequate for a simple list tool, but missing information on output format and whether the tool is read-only. No annotations to fill gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% (account parameter has description). The description does not add extra meaning for the undocumented parameters (cpanel_user, domain) beyond the tool's purpose.

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?

Description clearly states the verb 'List' and the resource 'email forwarders' with scope 'for a cPanel user's domain'. It is specific and distinguishes from siblings like cpanel_email_list which lists email 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 versus alternatives such as cpanel_email_list. No exclusions or prerequisites mentioned.

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