Skip to main content
Glama

Read background task output

task_output
Read-onlyIdempotent

Read a background task's log by tail or byte offset, optionally wait for new output or exit, and return next_offset for cheap incremental polling.

Instructions

Read a task log, either the last N lines (default) or an incremental byte range via offset. Use wait_ms to wait for new output. The result includes next_offset for cheap incremental polling.

Input Schema

NameRequiredDescriptionDefault
idYesTask id returned by task_start.
offsetNoByte offset to read from. Omit to read the tail.
wait_msNoWait for new output or task exit. Default 0.
wait_forNoWith wait_ms: return on new output/exit (any) or only when the task exits. Default any.
tail_linesNoWhen reading the tail, number of lines. Default 200.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description adds genuinely new context by disclosing that the result includes next_offset, enabling cheap incremental polling. Without an output schema, this return-shape hint is exactly the value the description should supply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core action, then mode selection, then the polling tip. No filler; every sentence adds actionable information.

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?

Covers the calling model (tail vs. offset, blocking via wait_ms) and hints at the return value (next_offset) despite there being no output schema. A slightly fuller explanation of chaining next_offset back into offset would make it fully self-contained, but nothing an agent needs to call it correctly is absent.

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 adds meaning beyond the schema by framing offset vs. tail as two alternative read modes and linking wait_ms to the wait-for-new-output behavior. The wait_for parameter and next_offset contract are only partially spelled out (e.g., no explicit tie between offset and next_offset chaining).

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 ('Read a task log') and immediately names the two read modes (tail lines / byte offset), which cleanly separates it from task_start, task_stop, task_list, and terminal_read. It stops short of explicitly naming those siblings, but the resource is unambiguous.

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

Usage Guidelines4/5

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

Gives clear operational guidance: default is tail-of-log, offset for incremental reads, and 'Use wait_ms to wait for new output' for blocking/polling. No explicit when-not-to-use or named alternative, which keeps it below a 5.

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