Skip to main content
Glama

swarm_task_list

Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.5

TDQS

A4.8/5.0
Behavior4/5

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

Annotations already signal read-only/non-destructive, and the description reinforces that with 'Read-only.' It then adds valuable behavioral detail: the call requires a swarm manager, non-managers get the daemon's refusal, and each result carries the full Spec/ContainerSpec. It could go further with pagination or result-volume caveats, but annotations already lower that burden.

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

Conciseness5/5

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

The description is front-loaded with a clear one-line summary and then a well-ordered set of differentiations, use cases, and caveats. Every sentence contributes useful information; there is no filler and no redundant repetition of input-schema content.

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?

Even without a schema-description coverage or output schema, the description states the return shape (`ID`, `ServiceID`, `NodeID`, `Slot`, `Spec`, `Status`, `DesiredState`), the filter behavior, the supported keys/enums, and the manager prerequisite. This is enough for an agent to invoke it correctly.

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?

With 0% schema-description coverage, the description carries all burden for the single parameter. It compensates thoroughly: it documents the `filters` dict, lists valid keys (`id`, `name`, `service`, `node`, `label`, `desired-state`), gives allowed desired-state values, and explains that omitting the filter returns every task.

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 opens with a specific verb, resource, and scope: 'List tasks across the whole swarm'. It immediately distinguishes itself from `service_ps` and `stack_ps`, so an agent can tell what this tool covers without inspecting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use guidance for whole-cluster questions, tells the agent when `service_ps` is the simpler alternative, and points to `swarm_task_logs` for reading a failing task's output. The filter documentation also maps to CLI equivalents like `docker node ps`.

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