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
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Keep only lines containing this text | |
| site | Yes | Site id (see list_sites); must be hosted on Bearfort | |
| type | Yes | Which log | |
| lines | No | Last N matching lines (default 200) | |
| since | No | Only lines at or after this time, e.g. 2026-10-08T12:00:00Z |