Skip to main content
Glama
szoran53
by szoran53

Tail Log File

tail_file
Read-only

Read the last lines of a Linux log file to inspect recent events, with optional line count and path restricted to allowed directories.

Instructions

Tail a log file. Path must start with an allowed prefix (default: /var/log).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to log file
linesNoNumber of lines to return

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered structurally. The description usefully adds the previously unknown constraint that the path must fall under an allowed prefix (default /var/log), which an agent needs to avoid a failed call, but it says nothing about error behavior, truncation, or how the tail is computed.

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 no filler, and the purpose is front-loaded before the constraint. It is efficient, though the extreme brevity leaves the usage gap noted above rather than using the space to close it.

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?

For a simple two-parameter read tool with full annotation coverage and schema descriptions, the description covers the essentials plus the non-obvious prefix restriction. It is minimally adequate: an agent can call it, but the absence of any return-shape or failure-mode note (no output schema exists to compensate) leaves a small gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both 'path' and 'lines' are already documented, which sets the baseline at 3. The description adds one piece of meaning beyond the schema – that 'path' is validated against an allowed prefix with a default of /var/log – but adds nothing for 'lines' beyond the schema's default and max.

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?

The verb+resource pair ('Tail a log file') is specific and immediately actionable, and 'tail' semantics distinguish it from a generic read. However, it does not differentiate itself from close siblings like read_file, search_logs, or get_journal_logs, which an agent must choose between for log-reading tasks.

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 states a hard constraint (allowed path prefix) but gives no when-to-use guidance, no prerequisites, and no routing to alternatives such as search_logs or read_file. The agent is left to infer when tailing a single file is the right call versus filtering logs.

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