Skip to main content
Glama

docker_logs

Read recent logs from a Docker container to diagnose issues. Specify the container, optional host, and trailing line count.

Instructions

Read the recent logs of a Docker container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNotarget host name from the opsgate config; omit for the default host
linesNohow many trailing log lines (default 100, max 2000)
containerYescontainer name or ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says 'recent logs', which hints at a bounded tail rather than a stream, but it does not state that the operation is read-only/non-mutating, does not mention that it requires Docker daemon or socket access, and does not disclose behavior for a stopped or nonexistent container.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or repetition of the name. It is efficient, though it is arguably minimal to the point of under-specification rather than maximally informative conciseness.

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

Completeness3/5

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

For a simple 3-parameter read tool with fully documented parameters and no output schema, the description is nearly sufficient. What is missing is behavioral context — read-only status, host/daemon requirements, and the meaning of 'recent' relative to the lines default of 100 — which no structured field supplies.

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 (host, lines, container) are already documented with defaults and limits in the schema itself. The description adds no parameter-level meaning 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?

The description states a specific verb and resource ('Read the recent logs of a Docker container'), which is clearly distinct from sibling operations like docker_inspect, docker_ps, and docker_stats. However, it does not explicitly name or contrast itself with the nearest sibling (docker_inspect for container metadata), so sibling differentiation is implied rather than stated.

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?

There is no when-to-use or when-not-to-use guidance, and no alternatives are named. An agent must infer from the tool name that this is the log-reading option rather than, say, docker_inspect or journal_tail, and nothing indicates prerequisites such as the container needing to be running.

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