Skip to main content
Glama

fort_logs_read

Read access, error, PHP, or wp-cron server logs and filter them by line count, text match, or timestamp to troubleshoot WordPress issues.

Instructions

Read the fort's server logs: access (nginx), error (nginx), php (PHP errors) or wp-cron (its systemd journal). Filters run on the worker: lines = last N matching lines (1-2000, default 200), grep = keep lines containing this text (case-insensitive literal, no regex), since = drop lines older than this ISO time with zone (stack-trace lines stay with their entry). A missing log is an error, not an empty answer. Secret URL parameters (token=, key=, pass=, ...) and credential shapes are masked. Needs BEARFORT_API_KEY (Bearfort fleet 2026-10-08.3+ for the filters).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "type": "<type>"
    },
    "name": "fort_logs_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNoKeep only lines containing this text
siteYesSite id (see list_sites); must be hosted on Bearfort
typeYesWhich log
linesNoLast N matching lines (default 200)
sinceNoOnly lines at or after this time, e.g. 2026-10-08T12:00:00Z

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it discloses that filtering happens on the worker (so `lines` means last N *matching* lines, not last N overall), that grep is a case-insensitive literal with no regex, that stack-trace lines are grouped with their entry, that missing logs raise an error rather than returning empty, and that secrets and credential shapes are masked. Auth and version requirements are also given.

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 purpose and the type list, then filter semantics, then failure and security behavior. It is dense and somewhat run-on, but every clause carries operational information; little could be cut without losing meaning.

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 five-parameter, annotation-free, output-schema-free tool, this covers nearly all an agent needs: log selection, all three filter parameters, error semantics, masking, and auth/version prerequisites. The one gap is the shape of the returned lines (ordering, timestamps, truncation) which the agent must infer.

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 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema: grep is case-insensitive and literal (no regex), since requires a zone and keeps stack-trace lines attached to their entry, and lines is scoped to *matching* lines. Only `site` is left to the schema alone.

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 opens with a specific verb and resource ("Read the fort's server logs") and enumerates the four selectable log types with their sources (nginx access, nginx error, PHP errors, wp-cron systemd journal). An agent knows exactly what this tool returns and what the type enum means without opening the schema.

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?

Prerequisites are stated plainly: BEARFORT_API_KEY is required and the filters need fleet version 2026-10-08.3+. It also clarifies expected failure behavior (a missing log is an error). It stops short of explicit when-to-use vs when-not guidance, but no sibling in the catalog reads logs, so there is little competing alternative to route against.

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

Deploy Server

Other Tools