Skip to main content
Glama

stack_list

Read-only

List all Docker Swarm stacks deployed to the cluster, showing name, service count, and orchestrator. Requires a swarm manager.

Instructions

List the stacks deployed to the swarm, parsed from --format '{{json .}}'.

Requires the target daemon to be a swarm manager. compose_list is the non-swarm equivalent; drill into one stack with stack_services. Raises RuntimeError if the CLI call fails.

returns: list - One dict per stack (name, services count, orchestrator)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds meaningful behavioral detail: output is parsed from `--format '{{json .}}'`, return format is a list of dicts with specific keys, and a RuntimeError is raised if the CLI call fails. This enriches the agent's understanding without contradicting 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 compact and front-loaded with the core purpose. Each subsequent sentence earns its place by adding essential usage context, error behavior, and return structure. No redundant or filler content is present.

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?

For a no-parameter listing tool with a read-only annotation, the description fully covers purpose, prerequisites, alternatives, failure mode, and return format. The absence of an output schema is mitigated by explicitly stating the return type and fields.

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?

The input schema has zero parameters, so the baseline is 4. The description correctly omits parameter details and instead clarifies the tool's operational context (swarm manager requirement), which is the only relevant information for invocation.

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 stacks deployed to the swarm.' It also differentiates from sibling tools by mentioning `compose_list` as the non-swarm equivalent and `stack_services` for drilling into one stack, making the tool's scope 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?

Explicit guidance is provided: the tool requires a swarm manager daemon, `compose_list` is the alternative for non-swarm contexts, and `stack_services` is the follow-up for deeper inspection. This clearly states when and how to use the tool relative to its siblings.

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