service_logs
Retrieve a bounded snapshot of aggregated logs from a Docker swarm service, capped to avoid overwhelming context. Specify tail, since, or max_bytes to constrain output.
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 (ToolInputError
if exceeded) so a noisy service can't OOM the server. The default is a bounded tail=200;
tail="all" returns the whole buffer, which can be huge on long-running services and exceed
the agent's context - prefer an integer, or since, to constrain output. Logs aggregate across
all the service's tasks: use swarm_task_logs for one task, container_logs for one container,
and the service-logs://{id_or_name} resource for the resource-flavored equivalent of this
tool.
Args: details: Show extra details since: Show logs since this Unix timestamp tail: Number of lines from the end, or the literal "all" for everything max_bytes: Abort with ToolInputError if the buffered logs exceed this many bytes (default 32 MiB)
Returns: str: Decoded log output
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | ||
| since | No | ||
| stderr | No | ||
| stdout | No | ||
| details | No | ||
| max_bytes | No | ||
| id_or_name | Yes | ||
| timestamps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |