Skip to main content
Glama

docker_logs

Read-only

Retrieve container log lines with timestamps and stream names. Narrow results by time window or line count, and follow live output for debugging.

Instructions

Reads what a container printed, line by line: each line carries the stream that wrote it and its own time. An empty list means the window held nothing, not that the read failed, and lines dropped from the middle are counted rather than quietly lost. Narrow the window with since and until instead of raising the count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoHow many of the last lines to read. Default: 100.
sinceNoOnly lines written after this: a duration (30s, 10m, 2h, 1d), a date (2026-08-22T10:00:00Z) or a UNIX timestamp. Applied before lines counts them.
untilNoOnly lines written before this, written the same way as since.
followNoWait for lines still to come; the call returns what arrived within 10s or 1024KB.
profileNoWhich Docker host, by profile name. Default: the profile marked as default.
projectNoWhich compose project. Default: the project of the working directory. A name matching nothing is an error, not a fall back to every container on the host.
serviceYesService name as written in the compose file.
compose_pathNoWhere the compose file is: the file itself, or the directory holding it. Needed only when no container of the host carries the project label — a project that was never brought up there. A directory holding several compose files is refused with their names rather than guessed through.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
linesNo
sinceNo
untilNo
followNo
legendNoWhat the words in this answer mean. A key names the field before the value — "state=running", "containers[].health=unhealthy" — and only the values this answer used are listed.
reasonNo
projectNo
serviceNo
truncatedNo
clipped_linesNo
returned_linesNo
truncated_reasonNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, and the description goes well beyond that: empty list means empty window, not failure; dropped lines are counted, not silently lost; stream and timestamp are returned per line. This is exemplary behavioral disclosure.

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?

Three sentences, no filler. The main action is front-loaded and every sentence adds either purpose or behavioral nuance. It earns its length.

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 output schema covers return values, annotations cover the read-only safety profile, and the schema covers parameter meanings. The description fills the remaining gaps: empty-vs-failure semantics, dropped-line accounting, and window-vs-count guidance. Nothing essential is missing for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers all eight parameters with individual descriptions, earning the baseline 3. The description adds a non-obvious parameter relationship — 'Narrow the window with since and until instead of raising the count' — which gives agents useful decision logic beyond the schema.

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: 'Reads what a container printed, line by line.' It also adds useful detail about line content (stream and timestamp). However, it doesn't explicitly distinguish itself from sibling tools like docker_container or docker_exec, so it misses the top bar.

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 makes the use case clear (reading container output) and even gives strategic advice: narrow with since/until rather than increasing the line count. It doesn't name alternative tools or say when not to use this tool, so it's 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.

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

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