Skip to main content
Glama

Read the error log

wp_get_error_log
Read-onlyIdempotent

Return the last lines of wp-content/debug.log, where WordPress writes PHP errors, warnings and notices when WP_DEBUG_LOG is on, for diagnosing failures. Read-only; returns available, lines (the count returned) and log (the lines as one text). Without a readable file there it answers available=false with a message, not an error; a log written to another path is not read. The log can hold file paths, queries and data plugins wrote into it. Requires manage_options and runs only with write access on. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
linesNoHow many trailing lines to return, 1 to 500 (values outside are clamped). Default 100.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / lines / description
      Previous value: -"How many trailing lines (max 500). Default 100."New value: +"How many trailing lines to return, 1 to 500 (values outside are clamped). Default 100."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the readOnlyHint annotation: it discloses the exact return keys (available, lines, log), that a missing file yields available=false with a message rather than an error, that the log may contain sensitive file paths and queries, and the WP_DEBUG_LOG prerequisite. It also explains the AlphaBridge Connect forwarding to a single reachable site, which matters for interpreting results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the resource and file path, then return shape, then failure behavior, then constraints. Roughly five dense sentences with no filler, though the multi-site forwarding note could be trimmed for a tool an agent will call for one purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return contract itself — available, lines, log — plus the non-error failure mode and the permissions/environment needed. That is everything an agent needs to call it and interpret either outcome.

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% and the single parameter is fully documented there, including the 1–500 clamp and default of 100. The description adds one useful clarification by naming the returned 'lines' count as distinct from the input 'lines' parameter, but contributes no further syntax or format detail. Baseline 3 applies.

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 — return the last lines of wp-content/debug.log — and explains what that file contains (PHP errors, warnings, notices when WP_DEBUG_LOG is on). No sibling tool reads a log file, and the description makes the scope boundary explicit, so an agent can distinguish it immediately.

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?

Frames the tool's purpose as 'diagnosing failures' and states the negative condition: a log written to another path is not read. It also gives the gating conditions (manage_options, write access on). There is no named alternative because no sibling serves as a substitute, so explicit when-not/alternative routing is largely moot here.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources