Skip to main content
Glama

container_logs

Read-only

Retrieve container logs with options for stdout, stderr, timestamps, and time range filters to debug and monitor Docker containers.

Instructions

Get the logs of a container.

args: id_or_name - The container id or name stdout - Include stdout stderr - Include stderr timestamps - Include timestamps tail - Number of lines from the end, or the literal "all" since - Only return logs created after this unix timestamp until - Only return logs created before this unix timestamp returns: str - Decoded log output

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tailNoall
sinceNo
untilNo
stderrNo
stdoutNo
id_or_nameYes
timestampsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. The description adds behavioral context by specifying the return type (decoded log string) and explaining the effect of each parameter (stdout, stderr, timestamps, tail, since, until). This goes beyond annotations and helps the agent understand output format and filtering behavior.

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 front-loaded with a one-line summary, followed by a clear, compact list of parameters and their explanations. It also states the return type. No wasted words; concise and well-structured for an agent to parse.

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?

Given the tool's 7 parameters and read-only nature, the description covers parameter meanings and return type adequately. It could be considered complete for basic usage, but lacks context on edge cases (e.g., empty logs, container not found) and does not differentiate from streaming log tools. Still, it provides enough information for typical use.

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?

The schema has 0% description coverage, so the description provides full parameter semantics. Each of the 7 parameters is explained with a short phrase (e.g., 'id_or_name - The container id or name', 'stdout - Include stdout'). This adds meaningful context beyond the schema's types and defaults.

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 'Get the logs of a container.' This is a specific verb and resource, distinguishing it from other container operations like 'follow_container_logs' which streams logs, or 'service_logs' which gets logs from a service.

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?

No explicit guidance on when to use this tool vs alternatives like 'follow_container_logs'. The description only explains parameters but does not provide context on selecting this tool over siblings.

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