Skip to main content
Glama

swarm_join

Join a Docker engine to an existing swarm as a worker or manager by supplying join tokens 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only provide readOnlyHint=false and destructiveHint=false, which don't cover the join behavior. The description compensates by explaining the failure case (already in a swarm), the role determination, and the reachability requirement for advertise_addr. It also mentions the exact source of join tokens, which is important context beyond the annotations. The return type (bool) is disclosed in the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear opening statement, followed by behavioral notes and a parameter list. It is not overly long and each sentence adds value. The parameter list is formatted clearly, though it might be slightly verbose for some agents.

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?

The description is complete for an agent to call the tool correctly: it explains the required parameters' purposes, the optional parameters' default behavior, and the failure condition. It also explains the role determination logic, which is crucial. The output is simple (bool) and is described. Given the tool's moderate complexity, the description covers all necessary aspects.

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 description coverage is 0%, so the description is the only source of parameter meaning. It provides detailed semantics for all parameters: remote_addrs (managers to connect to), join_token (determines role), listen_addr (inter-manager communication), advertise_addr (externally reachable), and data_path_addr (data traffic). This fully compensates for the schema's lack of descriptions.

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 action (join the Engine) and the target (an existing swarm), and explicitly distinguishes role determination (worker vs manager) based on the token. This differentiates it from sibling tools like swarm_init and swarm_join_tokens.

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 explains when the tool is used (joining an existing swarm) and provides a clear exclusion (fails if already part of a swarm). It also gives guidance for the advertise_addr parameter, noting when it needs to be set, which helps an agent decide whether to include optional parameters. However, it doesn't explicitly mention alternatives like swarm_init for creating a new swarm.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools