Skip to main content
Glama

swarm_leave

Destructive

Leave the current Docker swarm. Reschedules service tasks to remaining nodes; managers require force flag to avoid breaking raft quorum.

Instructions

Leave the current swarm.

The daemon's service tasks are rescheduled to the remaining nodes. A manager refuses to leave without force=True, since leaving can break raft quorum. The departed node lingers as "down" in node_list until a manager runs node_remove.

args: force - Force leave even if the node is a manager returns: bool - True after leaving the swarm

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate destructiveHint=true. The description adds context: daemon reschedules tasks, manager refuses without force, node lingering as 'down'. No contradiction with 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?

Very concise: one-line summary, detailed behavior, then clearly labeled args/returns. Every sentence adds value, no fluff.

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?

Given the complexity of swarm management, the description covers key behavioral traits, quorum implications, and post-leave state. No output schema is provided, but return type is specified.

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 coverage is 0%, but description explains the 'force' parameter's purpose ('Force leave even if the node is a manager') and notes the return type (bool), adding meaning beyond the schema's type/default.

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 'Leave the current swarm' as the primary action, and distinguishes from sibling tools like swarm_init, swarm_join, swarm_update by focusing on leaving.

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?

Explicitly states when force=True is needed for managers, explains consequences of leaving (raft quorum risk, lingering 'down' state), and mentions alternative node_remove to handle the departed node.

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

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