Websites/get_website_logs
Tool · Websites

get_website_logs

Get raw log lines for one domain on one of the caller's hosting services, within a time window: log_type=access for the HTTPS web-server access log (falls back to the plain HTTP log when the site has no SSL log), log_type=http_access for the plain HTTP access log specifically, log_type=php_error for PHP error_log files and WordPress debug.log. Results are tail-first (most recent matching lines first) and hard-capped at 500 lines / 256 KB — if truncated=true, narrow the time window or add a fixed-string search filter instead of paging. from/to must be ISO 8601 with an explicit offset (e.g. 2026-06-10T08:00:00+03:00 or ...Z); the effective window applied is echoed back in UTC. status=log_not_available means no such log file exists for that domain (do NOT report it as "no errors") — distinct from status=ok with zero lines, which means the log exists but nothing matched. status=unavailable_on_server means log access is not rolled out on that hosting server yet.

Read-onlyIdempotentOpen‑worldscope read:logs

Invoked over the MCP transport with a tools/call request naming this tool.

Authorization #

Requires a valid OAuth 2.1 bearer access_token whose grant includes the read:logs scope — Read your websites' access logs and PHP error logs. The broker resolves the caller from the token and returns only records the account owns.

Parameters #

service_idintegerRequired
The hosting service ID the domain belongs to. Obtain it via list_services.
domainstringRequired
The domain whose logs to read. Must belong to the hosting service (main, addon, or subdomain).
log_typestringRequired
Which log to read: "access" = the HTTPS web-server access log (the domain's SSL log), falling back to the plain HTTP log when the site has no SSL log; "http_access" = the plain HTTP access log specifically; "php_error" = PHP error_log files and WordPress debug.log found under the site's document root.
One of: access http_access php_error
fromstringRequired
Window start as ISO 8601 with a REQUIRED explicit offset, e.g. "2026-06-10T08:00:00+03:00" or "2026-06-10T05:00:00Z". Offset-less timestamps are rejected.
tostringRequired
Window end as ISO 8601 with a REQUIRED explicit offset. Must not be before "from".
searchstringOptional
Optional fixed-string filter (substring match, NOT a regex) — e.g. an IP, a URL path, or "PHP Fatal".
limitintegerOptional
Maximum lines to return. Capped at 500 server-side regardless of the requested value; omit for the full 500.

Response #

200 · application/json

logsobject
service_idinteger
domainstring
log_typestring
One of: access http_access php_error
statusstring
One of: ok log_not_available unavailable_on_server
linesarray<string>
truncatedboolean
fromstring
tostring
module_versionstring
files_cappedinteger
stopped_reasonstring

Errors #

ResultWhen
{ "error": "invalid_domain" }See the tool description for when this result is returned.
{ "error": "invalid_timestamp" }See the tool description for when this result is returned.
{ "error": "invalid_range" }See the tool description for when this result is returned.
{ "error": "not_found" }The requested item does not exist, or it belongs to another account. Cross-account IDs are indistinguishable from missing ones by design.