Skip to main content
Glama

stack_services

Read-only

List all services in a Docker stack with replica counts, parsed as JSON. Get a per-service rollup to monitor stack health, with optional filters by name or attributes.

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
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, destructiveHint=false), the description adds meaningful behavioral traits: it raises RuntimeError on CLI failure, requires a swarm manager, and describes the parsing method and output format. This goes beyond the annotation baseline and provides useful operational details.

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 appropriately sized and well-structured. It front-loads the core purpose in the first sentence, then provides alternatives, prerequisites, error behavior, and parameter details in a compact format. Every sentence and section contributes value without redundancy.

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?

There is no output schema, but the description specifies the return type and shape: 'list - One dict per service (id, name, mode, replicas, image, ports)'. It covers all necessary context for a simple list tool, including filtering syntax and the distinction from sibling tools, making it complete for an agent to invoke 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?

The input schema has 0% coverage, but the description compensates fully by explaining both parameters: 'name - The stack to list services for' and 'filters - Filter by attributes, e.g. {"name": "web"}; a list value repeats the filter'. This adds concrete semantics 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 clearly states the tool's function: 'List the services of a stack'. It specifies the verb 'list' and resource 'services of a stack', and distinguishes it from related siblings by noting that `stack_ps` is for individual tasks and `service_inspect` for full spec.

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 on when to use this tool versus alternatives is provided: 'use `stack_ps` for individual tasks and `service_inspect` for one service's full spec'. It also states the prerequisite 'Requires a swarm manager', giving clear context for usage.

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