Skip to main content
Glama

follow_container_logs

Read-only

Tail a container's log stream with line count and timeout bounds, returning when either limit is reached or the container exits.

Instructions

Tail a container's log stream, bounded by limit_lines, timeout_seconds, or container exit.

Returns when limit_lines lines are collected, timeout_seconds elapses, or the container exits, whichever comes first — so the agent can watch live output without blocking forever (limit_lines bounds memory, timeout_seconds bounds wall-clock for a quiet but long-lived container).

Caveat for ssh:// daemons: docker-py can't cancel an SSH stream, so the timeout_seconds watchdog can't interrupt a fully silent container — use container_logs (one-shot, non-streaming) there if you need a hard time bound.

args: id_or_name - The container id or name limit_lines - Max lines to collect before returning (default 200) stdout - Include stdout stderr - Include stderr timestamps - Include timestamps since - Only return logs created after this unix timestamp timeout_seconds - Max wall-clock seconds to follow before returning what was collected (default 30) returns: str - Decoded log output containing up to limit_lines lines

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNo
stderrNo
stdoutNo
id_or_nameYes
timestampsNo
limit_linesNo
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations declare `readOnlyHint: true` and `destructiveHint: false`, which are consistent. The description adds behavioral detail: the stream returns on first of three conditions, explains the bounding purposes, and discloses the SSH caveat where `timeout_seconds` watchdog can't cancel the stream. This goes well beyond annotations.

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?

The description is efficiently structured: a concise summary sentence, a paragraph explaining the bounded return behavior, a caveat paragraph, and a clean parameter list. Every sentence adds value, with no redundancy or fluff.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderate complexity (7 params, 1 required, streaming behavior) and the presence of output schema (returns str), the description covers return conditions, parameter defaults, and critical caveats. It is complete for an agent to decide and invoke correctly.

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

Parameters5/5

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

With 0% schema description coverage, the description carries full burden. It explains every parameter's role: `limit_lines` bounds memory, `timeout_seconds` bounds wall-clock, and the caveat explains when to avoid using this tool. This provides essential semantic context absent from the schema.

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

Purpose5/5

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

The description clearly states it 'tails a container's log stream' with explicit bounding conditions (limit_lines, timeout_seconds, container exit). It distinguishes itself from sibling `container_logs` by highlighting streaming vs. one-shot behavior, making the purpose unmistakable.

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

Usage Guidelines5/5

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

The description explicitly explains when to use this tool: 'to watch live output without blocking forever.' It also provides a concrete alternative: use `container_logs` for SSH daemons where the timeout can't interrupt a silent container, giving clear when-not guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GavinLucas/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server