whm_ssl_list
Retrieve a complete list of SSL certificates installed on a WHM server for a given account.
Instructions
List all SSL certificates installed on the server
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account alias from accounts.json (use list_accounts to see options) |
Implementation Reference
- src/tools.py:261-268 (registration)Registration of the whm_ssl_list tool with its name, description, and input schema (only requires account parameter).
Tool( name="whm_ssl_list", description="List all SSL certificates installed on the server", inputSchema={ "type": "object", "properties": ACCOUNT_PARAM, "required": ["account"] } - src/tools.py:505-506 (handler)Handler for whm_ssl_list: makes a GET request to the WHM 'fetchsslinfo' JSON API endpoint to retrieve all SSL certificates installed on the server.
case "whm_ssl_list": return await _get(client, url("fetchsslinfo"), headers) - src/tools.py:10-14 (helper)Helper function that constructs the WHM JSON API URL for a given function (e.g., 'fetchsslinfo').
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" - src/tools.py:34-40 (helper)Generic async HTTP GET helper used by the handler to execute the API call.
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:68-69 (registration)The server routes whm_* tool calls to handle_whm_tool, which dispatches to the whm_ssl_list case.
if name.startswith("whm_"): result = await handle_whm_tool(client, account, name, arguments)