Skip to main content
Glama

service_ps

Read-only

List a swarm service's tasks to reveal replica placement and failure reasons, helping diagnose service issues.

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: 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context: tasks carry Status/DesiredState/NodeID/Slot, the tool shows where replicas run and why they fail, and it requires a swarm manager. It does not detail pagination or error behavior, but for a read-only list tool the added context is solid.

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 compact and front-loaded: the core action and analogy come first, then the value proposition, then routing guidance, then a prerequisite, then a brief Args/Returns section. Every sentence earns its place and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only list tool with two parameters and no output schema, the description covers the purpose, the return shape, the filter keys, the prerequisite, and the alternatives. The only minor gap is exact filter value formats and whether filters are combined with AND/OR, but the description is otherwise complete enough for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It documents the filters dict keys (id, name, node, label, desired-state with allowed values) and the required id_or_name is implied by the tool's purpose. It also describes the return list shape. This goes well beyond the bare schema, though it doesn't give exact filter value formats.

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 states a specific verb ('List'), a specific resource ('a swarm service's tasks'), and clarifies the domain ('per-replica scheduling units') with a Docker CLI analogy. It distinguishes itself from container_list, stack_ps, and the service-tasks resource, so an agent can tell it apart from siblings without opening schemas.

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?

The description explicitly says when to prefer this tool over container_list (services may run on other nodes), stack_ps (whole-stack scope), and the service-tasks resource (computed rollout summary). It also states a prerequisite: requires a swarm manager. This is clear when-to-use guidance with named alternatives.

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