Read Host File
file_readRead the last lines of any absolute file on an Unraid host over SSH, with optional server-side regex filtering for large logs or files the GraphQL API cannot access.
Instructions
Read-only. Returns the last lines lines of any absolute file path on the Unraid host over SSH, reaching files the GraphQL API cannot (e.g. /boot/logs/syslog-previous, /proc/cpuinfo). Optional pattern (extended regex) filters server-side via grep before the tail, so searching huge logs stays cheap. Prefer log_read for any log that log_list returns: it needs no SSH and pages from any line. file_read only tails, and output beyond 30000 characters is truncated. Requires SSH to be configured (UNRAID_SSH_* environment variables); reads run as the SSH user (typically root).
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": {
"path": "<path>"
},
"name": "file_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the file on the Unraid host (must start with `/`). | |
| lines | No | Lines to return from the end of the file, or the last N matching lines when `pattern` is set. | |
| pattern | No | Extended regex (grep -E); only matching lines are returned, filtered on the host before the tail. | |
| response_format | No | `detailed` returns full JSON instead of readable text. | concise |