Skip to main content
Glama

Read container logs

container_logs

Fetch recent log lines from a container's stdout/stderr to diagnose crashes, monitor startup, or verify deployments. Optionally filter by a time window.

Instructions

Fetch the most recent log lines from a container's stdout/stderr. Use this to diagnose crashes, watch startup output or confirm a deployment. Supports an optional time window via since.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tailNoNumber of trailing lines to return (default from server config).
sinceNoOnly return logs newer than this. Accepts a Unix timestamp (seconds) or a relative value like '10m' or '2h'.
containerYesContainer name, short id or full id.
timestampsNoPrefix each line with its timestamp (default: false).
Behavior3/5

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

No annotations provided, so the description carries the full burden. It discloses that it fetches recent log lines from stdout/stderr and supports time filtering, but does not mention defaults (e.g., number of lines via 'tail'), error behavior (e.g., container not found), or whether it blocks or returns immediately.

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 very concise: two sentences that front-load the purpose, then add usage context and a key feature. No redundancy or unnecessary details.

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 simple log-fetching tool with 4 parameters and no output schema, the description covers the primary purpose and a key parameter. It could be slightly improved by mentioning the 'tail' limit or that timestamps can be added, but the schema fills those gaps.

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 the baseline is 3. The description adds some value by mentioning the 'since' parameter for time window, but does not elaborate on other parameters like 'tail', 'timestamps', or 'container' beyond what the schema provides.

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 'Fetch the most recent log lines from a container's stdout/stderr', using a specific verb and resource. It also provides specific use cases ('diagnose crashes, watch startup output or confirm a deployment'), which distinguishes it from sibling tools like container_stats or inspect_container.

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?

The description gives clear contexts for use (diagnose crashes, watch startup, confirm deployment) and mentions the optional 'since' parameter for time window filtering. However, it lacks explicit guidance on when not to use this tool or compare it to alternatives like container_stats or inspect_container.

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/soyrageagency/docker-mcp-server'

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