Skip to main content
Glama

tail_logs

Reads the last lines of a large log file without scanning the full file, with optional pattern filtering and a short follow window to capture newly appended entries.

Instructions

The last lines physical lines (max 1000), read from the end of the file without scanning the rest. If the newest file is short, earlier rotated files are used. Optional pattern filter (scans at most 64 MiB backwards). follow_seconds (max 60) then waits and returns lines appended during that window.

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

Input Schema

NameRequiredDescriptionDefault
pathYes
linesNo
regexNo
patternNo
ignore_caseNo
follow_secondsNo
include_rotatedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the disclosure burden and does so well: it explains the backwards-only read, the rotation fallback when the newest file is short, a 64 MiB scan cap for pattern matching, and a 60-second cap on follow_seconds. It omits error behavior for a missing/unreadable path and any permission notes, which are the main gaps.

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?

Compact and front-loaded, leading with what is returned and the no-scan guarantee before the optional behaviors. The phrasing is dense and slightly run-on in the first sentence, but every clause carries real information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 shape need not be explained, and the behavioral story for the risky parts (follow window, scan cap, rotation) is solid. For a 7-parameter tool with zero schema description coverage, though, three parameters (regex, ignore_case, include_rotated) get no explanation at all, leaving the definition short of complete.

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 0%, so the description has to compensate and it does for the non-obvious parameters: lines (max 1000), pattern plus its 64 MiB backward scan cost, and follow_seconds (max 60, and that it returns newly appended lines rather than blocking indefinitely). regex, ignore_case, and include_rotated are not addressed by name (rotation is only implied), which keeps it from a higher score.

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?

Names a specific verb (tail / read from end) and resource (log file lines), plus the key constraint of not scanning the rest of the file. It never names a sibling like search_logs, so differentiation is implicit rather than stated, which keeps it below a 5.

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

Usage Guidelines3/5

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

Usage is implied by the mechanics: it describes the 'read the tail' and 'follow for N seconds' scenarios, which hints at when to reach for it over a full scan. There is no explicit when-to-use/when-not guidance or reference to alternatives such as search_logs or timeline.

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