Skip to main content
Glama

swarm_join

Join a Docker engine to an existing swarm as a worker or manager using the appropriate join token from any manager.

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 sparse annotations (readOnlyHint=false, destructiveHint=false), the description discloses important behaviors: it fails if already in a swarm, the role is entirely token-dependent, advertise_addr is auto-detected under certain conditions and must be reachable by all nodes, and it returns a boolean. This adds substantial transparency about failure modes and networking requirements.

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 with a purpose statement, behavioral details, and a clean args list. Every sentence adds necessary information, including the failure condition and auto-detection nuance. It is appropriately sized for the complexity of the operation without excessive verbosity.

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?

The tool has moderate complexity (swarm networking) and an output schema (bool) which is mentioned in the description. The description covers all parameters, failure modes, and return value. It also references related tools (swarm_join_tokens) for context. Nothing critical appears missing for an agent to select and invoke the tool 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 provides zero parameter descriptions, but the 'args:' section fully explains each parameter's purpose: remote_addrs, join_token, listen_addr, advertise_addr, and data_path_addr. It also elaborates on join_token's role-determining semantics and advertise_addr's auto-detection behavior, going well beyond the raw 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 action: 'Join this Engine to an existing swarm as a worker or manager.' It uses a specific verb+resource and distinguishes from siblings like swarm_init (which creates a new swarm) by explicitly referencing 'existing swarm.' The role (worker/manager) is also clarified as determined by the token.

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?

The description gives explicit when-not guidance: 'Fails if the Engine is already part of a swarm.' It also explains the prerequisite of obtaining tokens from swarm_join_tokens, indicating proper context. While it doesn't name alternatives like swarm_init, the failure condition and existing-swarm context provide clear usage boundaries.

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