Skip to main content
Glama

whm_dns_list_zones

Retrieves all DNS zones for a specified WHM account, providing a complete list of managed zones.

Instructions

List all DNS zones managed by this WHM server

Input Schema

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

Implementation Reference

  • src/tools.py:198-206 (registration)
    Tool definition/registration for whm_dns_list_zones, defined alongside other WHM tools in the whm_tools() function.
    Tool(
        name="whm_dns_list_zones",
        description="List all DNS zones managed by this WHM server",
        inputSchema={
            "type": "object",
            "properties": ACCOUNT_PARAM,
            "required": ["account"]
        }
    ),
  • Handler for whm_dns_list_zones: makes a GET request to WHM JSON-API 'listzones' endpoint with the account's authentication headers.
    case "whm_dns_list_zones":
        return await _get(client, url("listzones"), headers)
  • Helper that builds the Authorization header using the WHM token from the account config.
    def _headers(account: dict) -> dict:
        token = account["token"]
        user = account.get("user", "root")
        return {
            "Authorization": f"whm {user}:{token}",
            "Content-Type": "application/json"
        }
  • Generic async HTTP GET helper used by all WHM tool handlers, including whm_dns_list_zones.
    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 that constructs the WHM JSON-API URL for a given function name (e.g., 'listzones').
    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"
Behavior3/5

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

No annotations provided, so description carries full burden. It states it lists zones (read operation), but lacks disclosure of behavioral traits like pagination, rate limits, or permissions. Adequate for a simple list but no extra context beyond the operation.

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, no wasted words. Front-loaded with purpose. Appropriate length for the tool's simplicity.

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?

No output schema and no behavioral annotations. Description covers what the tool does but does not describe return format or any constraints. For a simple list, it's minimally complete but could add 'Returns an array of zone names'.

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 100% with good parameter description for 'account'. The tool description adds no parameter information; it relies entirely on schema. Baseline 3 is appropriate as schema does the heavy lifting.

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 uses specific verb 'List' and resource 'DNS zones' with clear scope 'managed by this WHM server'. Distinguishes from sibling tools like whm_dns_zone_records (zone-level records) and cpanel_dns_records (cPanel level).

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?

No explicit when-to-use or alternatives guidance. Usage is implied (for listing zones), but no mention of when to prefer this over sibling tools. The parameter description hints at 'list_accounts' but not for usage switching.

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