swarm_task_list
List all tasks across a Docker swarm cluster in one call, with filters for node, service, or desired state. Get full task details including container spec, ideal for identifying failures anywhere.
Instructions
List tasks across the whole swarm, like docker service ps with no service to scope it.
The cluster-wide view of what is actually scheduled. service_ps covers one service and
stack_ps one stack, so answering "what is failing anywhere" or "what is running on this node"
through those means looping over every service; this is one call. Filter by node for a node's
workload (the CLI's docker node ps), desired-state to separate what should be running from
what is shutting down, or service for a single service -- for which service_ps is the
simpler call. Each task carries its full Spec, including the ContainerSpec (image, command,
env), so this returns much more per task than the service-tasks://{id_or_name} resource's
computed rollout summary. Read-only. Requires a swarm manager: any other node raises
docker.errors.APIError.
args:
filters - Filter dict; keys: id, name, service, node, label, desired-state
(running|shutdown|accepted); omit for every task in the cluster
returns: list - One full task document per task (ID, ServiceID, NodeID, Slot, Spec, Status,
DesiredState), the same shape service_ps returns
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No |