Skip to main content
Glama

swarm_join

Join a Docker engine to an existing swarm as a worker or manager by providing the appropriate join token and manager addresses.

Instructions

Join this Engine to an existing swarm as a worker or manager.

Fails if the Engine is already part of a swarm. Whether this node joins as a worker or a manager is determined entirely by which token is passed — join_token must be one of the two tokens from swarm_join_tokens, called against any existing manager. advertise_addr only needs setting when this host has multiple network interfaces or is behind NAT (otherwise it is auto-detected from the interface used to reach remote_addrs); it must be reachable by every other node in the swarm.

args: remote_addrs - Address(es) of existing swarm managers to connect to join_token - The worker or manager join token (from swarm_join_tokens) — determines the role this node joins as listen_addr - Listen address for inter-manager communication advertise_addr - Externally reachable address advertised to other nodes data_path_addr - Address to use for data path traffic returns: bool - True after the engine joins the swarm

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
join_tokenYes
listen_addrNo0.0.0.0:2377
remote_addrsYes
advertise_addrNo
data_path_addrNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses important behaviors: the join fails if already in a swarm, the role is determined by the token, and advertise_addr needs special handling for multi-interface/NAT hosts. These are meaningful behavioral details not available from annotations alone.

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 well-structured and front-loaded with the core purpose. The additional paragraphs provide necessary detail for a tool with 5 parameters and network topology considerations. Each sentence adds value, and the args section is clearly separated and labeled.

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 tool of this complexity, the description covers prerequisites (must not already be in swarm, need token from existing manager), parameter semantics, failure conditions, and even the return value. It is complete enough for an agent to decide when to use it and how to invoke it correctly, especially given the rich sibling context.

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?

With 0% schema description coverage, the description fully compensates by explaining each parameter in the args section. It clarifies that join_token determines role, advertise_addr is only needed for specific network situations, and remote_addrs are existing manager addresses. This adds significant meaning beyond the bare types and defaults in the 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 'Join this Engine to an existing swarm as a worker or manager,' which is a specific verb+resource+scope statement. It clearly distinguishes this from sibling tools like swarm_init (creating a new swarm) and swarm_leave (leaving a swarm), and also states the failure condition when already part of a swarm.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use (joining an existing swarm) and includes an exclusion (fails if already in a swarm). It references swarm_join_tokens as a prerequisite for the token. However, it does not explicitly name alternatives like swarm_init for creating a new swarm, leaving that to be inferred from context and sibling names.

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