Skip to main content
Glama

log_tail

Read-onlyIdempotent

Reads new lines from gen/log.txt using a cursor, returns the next cursor, and detects game-start log rotation to recover unread lines from the previous session.

Instructions

Follow gen/log.txt: returns lines written since cursor and next_cursor for the next call. Without a cursor returns the last initial_lines lines. Detects the log being recreated at game start (rotated=true) and first returns the unread rest of the old session from log_prev.txt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNo
max_linesNo
initial_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world. The description adds real behavioral context beyond that: rotation detection (rotated=true) at game start and draining the prior session from log_prev.txt first. It doesn't mention rate limits or output formatting, but the added semantics are meaningful.

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?

Three sentences, front-loaded with the core purpose, and each sentence adds a distinct piece of information (return contract, default behavior, rotation handling). Dense but free of filler.

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?

For a read-only tailing tool with no output schema, the description covers the cursor lifecycle, default behavior, and the non-obvious rotation/prev-file case. The one gap is `max_lines`, which an agent cannot infer from anywhere.

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 coverage is 0%, so the description carries the burden. It explains `cursor` (returns lines since it, emits `next_cursor` for the following call) and `initial_lines` (used when no cursor is given), but `max_lines` is never mentioned in either the schema or the description, leaving one of three parameters undocumented.

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+resource ("Follow gen/log.txt") and describes the cursor-based return contract, so an agent knows it tails a log. It never names or contrasts with close siblings like read_log or watch_log_start, so differentiation is left to inference.

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?

Gives clear internal usage rules: pass `cursor` to continue, omit it to get the last `initial_lines`. However it never says when to choose this over read_log, log_errors, or the watch_log_* polling siblings, so the usage context against alternatives is only implied.

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