Skip to main content
Glama
cPanel/WHM MCP Server

cPanel/WHM MCP Server

by nathjc2

Get a site's error log

whm_get_error_log
Read-onlyIdempotent

Read recent PHP or Apache error log lines for a domain to diagnose site failures. Choose the log source and line count when PHP errors are logged elsewhere.

Instructions

Get recent error log lines for a domain. php reads the error_log file in the domain's document root. apache_error and apache_suexec read the Apache logs for that domain. If php returns nothing, the site may log PHP errors elsewhere, so try apache_error.

Input Schema

NameRequiredDescriptionDefault
linesNoHow many of the most recent lines to return.
domainYes
sourceNoWhich log to read.php

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description's job is to add context, which it does: it explains what each source actually reads (a file in the document root versus Apache logs) and discloses the known failure mode where php returns empty. It stops short of describing the shape of the returned lines.

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?

Four short sentences, front-loaded with the core action, then source semantics, then the fallback tip. No sentence is filler and the ordering matches how an agent would reason about the call.

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?

For a three-parameter read tool with no output schema, the description covers selection logic and failure modes well. The only real gap is that it never characterizes the return value (raw log lines versus structured entries), which the agent would otherwise have to discover.

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

Parameters4/5

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

Schema coverage is 67% and the description compensates for the most important gap by explaining what each enum value of source reads. The lines parameter is already documented in the schema and domain is self-evident, so this is close to full coverage.

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?

States a specific verb and resource ('Get recent error log lines') scoped to 'a domain', and no sibling tool in the list reads logs, so the agent can place it immediately. The title and description reinforce each other rather than restating.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete selection guidance for the source parameter and an explicit fallback heuristic: 'If php returns nothing... try apache_error.' That is real when-to-use advice, though it never says when not to reach for this tool versus other diagnostics like whm_server_status.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.