Skip to main content
Glama

swarm_join

Join a Docker Engine to an existing swarm as a worker or manager by providing a 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
Behavior4/5

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

Annotations indicate a mutating, non-destructive operation. The description adds behavioral details: the join will fail if already part of a swarm, role is determined by the token, and advertise_addr can be auto-detected. It also correctly notes the return type (bool). However, it does not fully describe the side effect of becoming part of the swarm, but this is implicit.

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 a single focused paragraph followed by a structured list of arguments. It is front-loaded with purpose and constraints, and every sentence provides necessary information without redundancy.

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?

Given the tool has 5 parameters with 0% schema coverage, no enums, and an output schema (bool), the description comprehensively covers all aspects: purpose, preconditions, parameter details, and return value. There are no significant gaps.

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?

Schema description coverage is 0%, so the description carries the full burden. It explains each parameter in context: remote_addrs (manager addresses), join_token (role-determining token from swarm_join_tokens), listen_addr (with default), advertise_addr (when to set), and data_path_addr. This provides complete semantic meaning.

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 starts with a clear verb-resource pair: 'Join this Engine to an existing swarm as a worker or manager.' It specifies the action, target, and possible roles, distinguishing it from sibling tools like swarm_init (initiate a new swarm) and swarm_leave (leave 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 states a key precondition: 'Fails if the Engine is already part of a swarm.' It also explains that the role is determined by the token value and gives guidance on when to set advertise_addr. While it does not explicitly name alternatives, the context of sibling tools and the detailed constraints provide sufficient usage guidance.

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