Skip to main content
Glama

stack_services

Read-only

List services of a Docker stack, returning per-service replica counts, images, and ports as structured JSON data for easy inspection.

Instructions

List the services of a stack, parsed from --format '{{json .}}'.

Service-level rollup (replicas ready per service); use stack_ps for individual tasks and service_inspect for one service's full spec. Requires a swarm manager. Raises RuntimeError if the CLI call fails.

args: name - The stack to list services for filters - Filter by attributes, e.g. {"name": "web"}; a list value repeats the filter returns: list - One dict per service (id, name, mode, replicas, image, ports)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
filtersNo
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds context by noting the `--format '{{json .}}'` parsing and that a RuntimeError is raised on CLI failure. It also clarifies the service-level rollup, but does not detail all possible error conditions or empty-list behavior.

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 concise and well-structured: a one-sentence purpose, a brief usage note, then args/returns. No filler or redundant information.

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?

Given no output schema, the `returns` field provides the list shape (id, name, mode, replicas, image, ports). It covers prerequisites, alternatives, and error behavior, making it fully contextual for a 2-parameter read-only tool.

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 description coverage is 0%, so the description carries the full burden. The args section explains both parameters: `name` is the stack to list, and `filters` includes an example and notes that a list value repeats the filter. This goes well beyond the bare 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 the services of a stack') and explicitly distinguishes itself from stack_ps and service_inspect, making the tool's purpose unambiguous.

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 explicitly states when to use this tool vs alternatives: 'Service-level rollup... use stack_ps for individual tasks and service_inspect for one service's full spec.' It also notes the prerequisite of a swarm manager, providing clear contextual guidance.

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