Skip to main content
Glama

Read logs

logs
Read-onlyIdempotent

Read a log by name for a time window, with repeated messages counted once: how many different errors there are, how often each happened, when first and last, a sample of each (with the top of its stack trace) and the latest lines. Suited to finding what went wrong in a long log. log is one of: web-error (nginx and Apache error logs, each site's own included), php (PHP and PHP-FPM, and error_log files next to the code), site (the site's own application log, whatever kind it is: Shopware and PrestaShop var/log, Laravel storage/logs, Joomla and OpenCart logs), magento (exception.log and system.log of the site, plus how many error pages visitors saw), wordpress (wp-content/debug.log), database (MySQL/MariaDB error log), system (warnings and errors in the journal), mail, auth (logins). Or give path for any other log file. match keeps only entries holding that text. Log lines can hold personal data such as addresses and order references: report the pattern and the counts, not the personal data itself.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
logNo
pathNoAbsolute path of a log file, instead of log.
siteNoSite root folder, like /var/www/shop, or one of the site's domains. Optional when the server has one site (see list_sites).
hoursNoHow far back. Default 24, up to 168.
matchNoOnly entries containing this text (not case-sensitive).
serverNoServer name or id. Optional when the account has one server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world, so safety is covered; the description goes well beyond by disclosing the aggregation/deduplication behavior and the exact shape of the response. It also adds a genuine operational constraint absent from structured fields: log lines may contain personal data, so report patterns and counts rather than the data itself.

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?

Purpose and output shape are front-loaded in the first two clauses, and the privacy caution closes the passage where it belongs. The first sentence is a long run-on that packs output semantics together with dupe-counting logic, and the platform-parenthetical enumeration is dense, but nearly every clause carries information an agent needs.

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 six-parameter tool with no output schema, the description covers the return shape, the time window, the path escape hatch, and the filtering semantics, which is strong. The gap is that `site` and `server` context defaults are left entirely to the schema, and there is no signal about how this differs from other file-reading siblings such as read_file.

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 83%, so the baseline is 3; the description earns above that by expanding each enum value of `log` far beyond the bare enum list (web-error = nginx/Apache including per-site, php = PHP-FPM plus error_log, site = per-platform var/log and storage/logs paths, and so on). It also restates `match` as a filter on entries, though the case-insensitivity is already in the schema.

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?

The description pairs a specific verb and resource ("Read a log by name for a time window") with an unusually precise account of the transformation applied: repeated messages are counted once, with counts, first/last timestamps, samples with stack-trace tops, and latest lines. An agent knows exactly what it gets back, not just that it reads a log.

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?

"Suited to finding what went wrong in a long log" gives a clear positive use case, and "Or give path for any other log file" states the escape hatch when the enum doesn't cover the target. What's missing is any exclusion or named alternative (e.g. when to use the generic file reader instead), so the routing decision is only half-guided.

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