Skip to main content
Glama

service_ps

Read-only

List tasks of a Docker swarm service, showing status, desired state, node, and slot, to identify replica placement and diagnose failures.

Instructions

List a swarm service's tasks (per-replica scheduling units), like docker service ps.

Shows where replicas run and why they fail: each task carries Status (State/Message/ContainerStatus), DesiredState, NodeID, and Slot. Prefer this over container_list for services (tasks may run on other nodes), stack_ps for a whole stack, and the service-tasks://{id_or_name} resource for a computed rollout summary. Requires a swarm manager.

args: id_or_name - The service id or name filters - Filter dict; keys: id, name, node, label, desired-state (running|shutdown|accepted) returns: list - Task dicts (ID, Slot, NodeID, Status, DesiredState, Spec)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo
id_or_nameYes
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the bar is lower. The description adds meaningful behavioral context by explaining what the tasks reveal ('Shows where replicas run and why they fail'), detailing the fields in each task, and noting the swarm manager requirement. This goes well beyond the safety annotations.

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 the core purpose, then provides layered detail in a well-structured format (args/returns). Every sentence contributes value: the Docker CLI analogy, the failure-analysis context, alternatives, prerequisites, and parameter documentation. No filler or repetition exists.

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?

Despite having no output schema, the description specifies the return structure: 'list - Task dicts (ID, Slot, NodeID, Status, DesiredState, Spec).' It also explains the significance of the data and how this tool relates to other service inspection methods. Given the tool's moderate complexity, this description is fully self-sufficient.

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?

Schema coverage is 0%, so the description must carry parameter documentation. It fully does: 'id_or_name - The service id or name' and 'filters - Filter dict; keys: id, name, node, label, desired-state (running|shutdown|accepted).' This provides types, allowed keys, and enum-like values directly in the description, compensating completely for the sparse 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 opens with a specific verb and resource: 'List a swarm service's tasks (per-replica scheduling units), like `docker service ps`.' It clearly differentiates from siblings by mentioning `container_list`, `stack_ps`, and the `service-tasks://` resource, making the tool's unique purpose unmistakable.

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?

Explicit guidance is provided: 'Prefer this over `container_list` for services (tasks may run on other nodes), `stack_ps` for a whole stack, and the `service-tasks://{id_or_name}` resource for a computed rollout summary.' It also states the prerequisite 'Requires a swarm manager,' giving clear when-to-use and alternative context.

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

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