Skip to main content
Glama

Read Log File

log_read
Read-onlyIdempotent

Read lines from a validated Unraid server log file, paging by line number when needed. Returns the tail by default, so you can inspect recent log activity.

Instructions

Read-only. Returns lines from a server log file. path is a path or name from log_list — validated against that list before reading (reads are limited to filenames the server lists in its log directory; symlinked entries are read as the server resolves them). Omitting start_line returns the last lines lines; pass start_line (1-indexed) to window from there and re-call with the hinted values to page. Counts may drift slightly on rapidly-growing logs; the cap bounds line count, not bytes. Requires LOGS read permission (any viewer-level key). For container logs use docker_container_logs; for host files log_list does not show, use file_read (SSH).

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": "log_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFull path or bare file name of a log, exactly as log_list returns it.
linesNoMaximum number of lines to return.
start_lineNo1-indexed line to start reading from; omit to get the last `lines` lines of the file.
response_formatNo`detailed` returns full JSON instead of readable text.concise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.3
    • addedInput schema / properties / lines / description
      Added value: +"Maximum number of lines to return."
    • addedInput schema / properties / path / description
      Added value: +"Full path or bare file name of a log, exactly as log_list returns it."
    • addedInput schema / properties / response_format / description
      Added value: +"`detailed` returns full JSON instead of readable text."
    • addedInput schema / properties / start_line / description
      Added value: +"1-indexed line to start reading from; omit to get the last `lines` lines of the file."
  2. First observedv0.1.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, so the bar is lower, and the description still adds real behavior: LOGS read permission requirement, path validation against the log_list directory, symlink resolution policy, and the caveat that counts can drift on rapidly-growing logs because the cap bounds lines, not bytes. Strong coverage; only the concise-vs-detailed return payload is left entirely to the schema.

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 two sibling disambiguations, then paging, then caveats, then permissions — a sensible priority order. The sentences are dense and parenthetical-heavy, so it is efficient rather than crisp, but no sentence is filler.

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?

No output schema exists, yet the description still conveys what comes back (log lines, readable text vs full JSON per schema), how to page, and what authorization is needed. Nothing an agent needs in order to invoke this correctly is missing.

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 baseline is 3, but the description contributes meaning the schema cannot express: `path` must originate from log_list and is validated against that listing before reading. The start_line/omission behavior is largely a restatement of schema text, keeping it below a 5.

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?

Opens with a concrete verb+resource ("Returns lines from a server log file") and immediately scopes it against the two plausible confusions: container logs live in docker_container_logs, unlisted host files in file_read. An agent can pick this tool without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing rules to named alternatives (docker_container_logs for containers, file_read for host files log_list does not show) and states the precondition that paths come from log_list. It also explains the two invocation modes: omit start_line for the tail, or pass start_line and re-call with the hinted values to page.

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