Skip to main content
Glama

Read Log File

read_log_file

Reads log files by returning the latest lines or a specified range from an offset, enabling targeted troubleshooting and system diagnostics.

Instructions

Read a log file. tail=True returns the last lines lines; tail=False reads lines lines starting at offset.

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

Input Schema

NameRequiredDescriptionDefault
pathYes
tailNo
linesNo
offsetNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden; it does disclose the two operating modes, which is meaningful. It says nothing about error behavior on missing or unreadable paths, encoding, truncation, or output size limits — gaps that matter for a file-reading tool with zero annotation coverage.

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?

Two short sentences with the mode distinction front-loaded and zero filler. The semicolon-joined structure is slightly dense but remains readable and waste-free.

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?

An output schema exists, so return values need not be explained, and the description covers the core mode semantics for a 4-parameter tool. Missing are failure modes and the tail/offset precedence rule, which keep it short of fully complete given the absence of annotations.

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 description coverage is 0%, so the description must compensate, and it does explain the interaction of tail, lines, and offset — the non-obvious part of the schema. It leaves `path` unaddressed and does not clarify whether offset is ignored when tail=True or what happens with a negative offset.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Read a log file") and immediately scopes the behavior with the two reading modes. It does not distinguish itself from plausibly overlapping siblings like read_file_text or read_journal, so an agent must infer which log/file reader applies.

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

Usage Guidelines2/5

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

The description explains how the modes work but never says when to choose this tool over an alternative file or log reader in the sibling set. There are no exclusions, no prerequisites (e.g., path format, permissions), and no guidance on typical tail-vs-offset scenarios.

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