Skip to main content
Glama

rotate_swarm_join_token

Rotate the worker or manager join token for Docker Swarm, invalidating the old token immediately to prevent unauthorized joins. Returns the new tokens.

Instructions

Rotate the worker and/or manager join token, then return the fresh tokens.

Rotating invalidates the old token immediately — nodes that have already joined are unaffected, but any pending invitations using the old token will fail. At least one of rotate_worker / rotate_manager must be True. Wraps swarm.update(rotate_*_token=...) and re-reads the tokens so the caller gets the new value in one step.

args: rotate_worker - Rotate the worker join token rotate_manager - Rotate the manager join token returns: dict - {"Worker": , "Manager": } after rotation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rotate_workerNo
rotate_managerNo
Behavior4/5

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

The description clearly discloses the behavioral effect: invalidating old tokens immediately, while unaffected nodes, pending invitations fail. It also explains the implementation (wraps swarm.update and re-reads tokens). Annotations only provide readOnlyHint and destructiveHint, so the description adds significant value beyond them.

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 two paragraphs, front-loaded with the main purpose and effects. Every sentence adds value: action, consequences, parameter list, return value. No redundant or filler content.

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?

For a simple two-parameter tool with no output schema, the description covers purpose, effect, return value, and parameter constraints. It lacks mention of prerequisites (e.g., swarm must be initialized) or error conditions, but these are minor given the tool's simplicity.

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?

The input schema has zero description coverage, but the description lists both parameters with clear semantics: 'Rotate the worker join token' and 'Rotate the manager join token'. It also adds the constraint that at least one must be True, which is not present 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 states exactly what the tool does: rotate worker and/or manager join tokens. It uses specific verb 'Rotate' and resource 'worker and/or manager join token', and distinguishes from sibling tools like get_swarm_join_tokens by clarifying it invalidates old tokens and returns new ones.

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

Usage Guidelines3/5

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

The description notes that at least one parameter must be True, which is helpful, but it does not explicitly compare to alternatives like get_swarm_join_tokens or update_swarm. There is no 'when to use' or 'when not to use' guidance, leaving the agent to infer usage context from the sibling list.

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