Skip to main content
Glama

service_logs

Read-only

Fetch a bounded snapshot of a Docker swarm service's logs, capped at a configurable byte limit to prevent memory overflow.

Instructions

Get a bounded snapshot of a swarm service's logs (never follows).

follow is intentionally not exposed: the stream is joined into one string before returning, so following would block forever and grow unbounded. Collection is capped at max_bytes (ValueError if exceeded) so a noisy service can't OOM the server. The default tail="all" returns the whole buffer, which can be huge on long-running services and exceed the agent's context — pass an integer (e.g. tail=500) or use since to constrain output.

args: service_id - The service id or name details - Show extra details stdout - Include stdout stderr - Include stderr since - Show logs since this Unix timestamp timestamps - Include timestamps tail - Number of lines from the end, or the literal "all" max_bytes - Abort with ValueError if the buffered logs exceed this many bytes (default 32 MiB) returns: str - Decoded log output

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tailNoall
sinceNo
stderrNo
stdoutNo
detailsNo
max_bytesNo
service_idYes
timestampsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already indicate read-only and non-destructive behavior. The description adds critical behavioral details: the stream is joined into one string, collection is capped at max_bytes to prevent OOM, and the default tail='all' may exceed context. This goes well beyond annotation information.

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?

The description is well-structured: a concise purpose statement, followed by behavioral details, and a clean parameter list. While efficient, it could be slightly more concise without losing essential information.

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?

Given the tool's complexity (8 parameters, output as string), the description covers all important aspects: boundedness, no follow, max_bytes limit, tail and since usage. It fully prepares the agent for correct invocation and interpretation.

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

Parameters5/5

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

Despite 0% schema description coverage, the description thoroughly documents all 8 parameters with defaults, types, and constraints (e.g., tail can be integer or 'all', max_bytes default 32 MiB). This provides essential semantic meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves a bounded snapshot of a swarm service's logs, with the key distinction that it never follows. It specifies the resource (service logs) and the action (get snapshot), differentiating it from sibling tools like container_logs and follow_container_logs.

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 provides clear guidance on when to use this tool (for a snapshot) and explicitly warns against using follow because it would block. It advises using tail and since to constrain output. While it doesn't name alternative tools, the context is clear and helpful.

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

Install Server

Other Tools

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

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