Read Site Error Log
Returns the most recent lines of WordPress's own debug log, newest last, optionally filtered by keyword or severity. Read-only, and it only ever reads the log WordPress is configured to write; it cannot be pointed at another file. Values that look like passwords, keys or tokens are masked before the text is returned. Use it to find the actual error behind a white screen or a failing feature.
Also known as: error log, read the error log, debug log, php errors, site errors, fatal errors.
| Property | Value |
|---|---|
| Ability slug | mosmcp/site-read-error-log |
| Wire tool name | mosmcp__site-read-error-log |
| Category | Maintenance (mosmcp-maintenance) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | manage_options |
| Minimum default role | Administrator |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| lines | integer (1–500) | 50 |
How many of the most recent lines to return. | |
| search | string | — | Optional keyword; only lines containing it are returned. | |
| severity | string (one of fatal, error, warning, notice, deprecated) |
— | Optional filter: "fatal", "error", "warning", "notice" or "deprecated". |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| logging_enabled | boolean | Yes | False when WordPress is not configured to write a debug log, in which case there is nothing to read. |
| log_exists | boolean | Yes | |
| size_bytes | integer | ||
| showing | integer | Yes | |
| truncated | boolean | True when older lines exist beyond the ones returned. | |
| lines | string[] | Yes | Log lines, oldest first, with secrets masked. |
| notes | string[] |
Example
Sample prompt
My site shows a white screen, check the error log for fatal errors.
Example request (json)
{
"jsonrpc": "2.0",
"id": 245,
"method": "tools/call",
"params": {
"name": "mosmcp__site-read-error-log",
"arguments": {
"input": {
"lines": 20,
"severity": "fatal"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 245,
"result": {
"isError": false,
"structuredContent": {
"logging_enabled": true,
"log_exists": true,
"size_bytes": 1048576,
"showing": 1,
"truncated": true,
"lines": [
"[29-Sep-2026 09:14:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function acme_render() in /wp-content/themes/acme/functions.php:88"
],
"notes": [
"Only the most recent part of the log was read, because the file is large. Older entries exist before what is shown."
]
}
}
}
Edge cases / errors
- WP_DEBUG_LOG off → logging_enabled: false with a note on how to enable it; no readable log → log_exists: false, empty lines.
- Only reads the log path WordPress is configured to use (or wp-content/debug.log); it can't read any other file.
- Only the last 256 KB of a large log is read (truncated: true); passwords, keys, tokens and salts are masked in the returned lines. lines is capped at 500.
| << Previous | Next >> |
|---|---|
| List URL Rules | Refresh Permalinks |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.