Skip to main content
Glama

get_docker_container_logs

Fetch a Docker container's stdout/stderr logs, optionally limiting to a number of lines and including timestamps. Read-only via the Docker API with environment values redacted.

Instructions

Returns a container's stdout/stderr log lines. Params: tail (line count) and timestamps. Read-only via the Docker API. Fatal if the daemon is unreachable or the container is unknown. Environment values are redacted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tailNonumber of lines to tail (default: 100, max: 10000)
timestampsNoinclude timestamps (default: false)
container_idYescontainer name or ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsYes
errorsNo
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses that the operation is read-only, describes fatal error conditions (daemon unreachable or unknown container), and notes that environment values are redacted. This goes beyond the schema and provides critical behavioral context.

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 four concise sentences, front-loaded with the purpose. Each sentence adds value: what it returns, key params, read-only/error behavior, and redaction. No waste or filler.

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?

The description is complete for a simple log retrieval tool. It explains the output (log lines), key behaviors (read-only, fatal errors, redaction), and relies on the existing output schema for return structure. Given the low complexity and good annotation coverage, no further detail is needed.

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 mentions 'tail (line count) and timestamps' but this simply repeats what the schema already documents. It adds no additional parameter semantics, so a 3 is appropriate.

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 the tool's function with a specific verb and resource: 'Returns a container's stdout/stderr log lines.' It distinguishes this from sibling Docker tools (e.g., stats, top, details) by focusing on log retrieval, making the purpose 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?

The context for use is clear: use this to retrieve container logs. It doesn't explicitly name alternatives or when-not scenarios, but the description's focus on log lines and the sibling tool names make the intended usage obvious. A score of 4 is appropriate for clear context without exclusions.

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/Mohabdo21/linux-mcp'

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