Skip to main content
Glama

Docker service logs

docker_swarm_service_logs

Fetch Docker Swarm service logs by service name, optionally limiting tail lines or targeting a named context, to troubleshoot workloads and inspect runtime output.

Instructions

Fetch service logs (real service.logs via :meth:service_logs).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "service_name": "<service_name>"
    },
    "name": "docker_swarm_service_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
tail_linesNo
service_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare openWorldHint=true and destructiveHint=false, so the description's remaining job is to explain anything else — but it does not say whether logs are streamed or a snapshot, whether the call fails when the service is absent, or what permissions are needed. The phrase "real service.logs via service_logs" hints that an actual API call is made (not mocked), which is the only added value, and the readOnlyHint=false annotation sits uneasily with a pure "Fetch" operation without the description reconciling it.

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

Conciseness3/5

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

It is short and front-loaded, which is good, but the single parenthetical is internal implementation jargon (double backticks, :meth: role) that consumes a chunk of an already tiny description without helping an agent decide or invoke.

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

Completeness2/5

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

With no output schema, a required service_name, an undocumented tail_lines, and an open-world read against a Docker host, the description should say at minimum what comes back and how tail_lines shapes it. As written, an agent has to guess the return shape and the meaning of two of three parameters.

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 only 33%: `context` is documented, but `service_name` (the required parameter) and `tail_lines` (default 100) have no schema descriptions. The tool description adds no meaning for any parameter — not whether service_name is a swarm service name or ID, nor what tail_lines counts or whether it truncates.

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"), so an agent knows exactly the operation. It offers no differentiation from close siblings such as docker_service_logs, docker_compose_logs, or k8s_service_logs, and the parenthetical Sphinx reference (``service.logs`` via :meth:`service_logs`) is developer-facing noise rather than useful scoping.

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 guidance on when to pick this tool over the several other *_service_logs / *_compose_logs siblings, no prerequisites, and no exclusions. The only hint is the implicit "swarm" in the name, which the description never explains.

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

Deploy Server

Other Tools