swarm_task_list
List all Docker Swarm tasks cluster-wide in one call. Filter by node, service, or desired state. Returns full task documents including container specs.
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, and swarm_task_logs reads
what a failing one printed. 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: on any other node the daemon refuses, and its refusal is what comes back.
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 |