Skip to main content
Glama

docker_logs

Retrieve the last 50 lines of logs from a Docker container by default. Returns a snapshot of recent log output instead of streaming.

Instructions

Get logs from a Docker container: the last lines only, 50 by default, and it returns rather than following the stream

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesContainer name to get logs from
linesNoNumber of log lines to return (default: 50)
serverNoRemote server name from config (optional, runs locally if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.41.0
    • changedInput schema / properties / lines / type
      Previous value: -"string"New value: +"integer"
  2. First observedv0.10.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden, and it does contribute two traits not present in the schema: the result is a bounded tail ('last lines only') and it returns instead of blocking on a stream. It omits permissions, behavior for stopped/unknown containers, and error semantics, so a 4 rather than a 5.

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?

A single front-loaded sentence with a colon-delimited clause; every element (resource, scope, default, non-streaming behavior) earns its place and there is no filler.

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 three-parameter read tool with no output schema and no annotations, the description covers what the tool does and how the return differs from a streaming call. It leaves minor gaps around error cases and log stream contents (stdout/stderr, timestamps), which keeps it below 5.

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 all three parameters (name, lines, server) are already documented, including the 50-line default. The description restates the default line count but adds no syntax, format, or interaction guidance beyond the schema, so the baseline 3 applies.

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 and resource ('Get logs from a Docker container') and even scopes what subset is returned. It is clearly distinct from log-adjacent siblings like docker_stats or docker_top by the nature of the resource, but it never names or differentiates itself from them explicitly, so it stops short of a 5.

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

Usage Guidelines3/5

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

'Returns rather than following the stream' implies the usage context (a one-shot snapshot instead of a live tail), which is the only when-to-use signal offered. There is no explicit statement of when to prefer this over docker_top, docker_inspect, or any other diagnostics sibling, and no prerequisites are given.

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