Skip to main content
Glama

compose_logs

Read-onlyIdempotent

Fetches Docker Compose service logs with filters for tail, time range, follow, and specific services; helps diagnose container issues when logs are needed.

Instructions

Fetch service logs (docker compose logs).

Recovery: If logs empty, verify service names with compose_ps.

Return Format

{"success": bool, "action": str, "message": str, "result": {"output": str, "stderr": str}} On failure: {"success": false, "error": str, "recovery_options": [...]}

Examples

compose_logs(path="D:/dev/myapp", tail=100) compose_logs(path="D:/dev/myapp", services=["web"], since="2026-08-01T00:00:00")

Input Schema

NameRequiredDescriptionDefault
pathNo.
tailNo
sinceNo
untilNo
followNo
timeoutNo
servicesNo
timestampsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds a recovery path and return shape, but omits the most consequential behavior: that follow=true likely streams/blocks, and that timeout=300 acts as the guard — an agent could hang without knowing this.

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?

Front-loaded purpose sentence, then recovery, return format and examples in clearly labeled blocks — easy to scan. The return-format block duplicates the existing output schema, so it costs space without adding much, but the overall size is proportionate.

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?

Since an output schema exists, the description needn't restate return values, yet it does while leaving half the input parameters undocumented. For an 8-parameter tool with a blocking-streaming mode, the description is adequate but has clear gaps an agent would fall into.

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

Parameters2/5

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

Schema coverage is 0% across 8 parameters, so the description carries the full burden and largely fails it. Examples illustrate path, tail, services and since, but follow, timeout, until and timestamps are never explained — and these are the parameters whose semantics matter most.

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 ("Fetch service logs (docker compose logs)"), which is unambiguous on its own. It does not, however, contrast itself with siblings like container_ops or compose_ps beyond the recovery note, so an agent must infer where compose logs ends and container logs begin.

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?

Gives explicit failure-path guidance: "If logs empty, verify service names with compose_ps", naming the alternative and the condition that selects it. It lacks any when-not guidance (e.g. when to prefer container_ops or when follow is appropriate), so it is 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.