Skip to main content
Glama

swarm_unlock_key

Read-only

Retrieve the current Docker swarm unlock key for managers with autolock enabled. Use this key to unlock a manager after restart, restoring access when the swarm is locked.

Instructions

Return the swarm's current unlock key.

The key only serves a purpose when autolock is enabled (see swarm_init's / swarm_update's autolock_managers / rotate_manager_unlock_key). Must be called against an unlocked manager - a locked manager cannot serve API requests, including this one. Feed the result's key to swarm_unlock to unlock a manager after restart. Treat the key as a sensitive credential.

Returns: dict: {"UnlockKey": }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover readOnlyHint and destructiveHint, so the bar is lower. The description adds genuinely useful behavioral context: the key is only meaningful with autolock, this call cannot succeed against a locked manager, and the key should be treated as a sensitive credential. These are non-obvious facts not inferable from the annotations.

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 compact and front-loaded: one sentence states the core purpose, a few sentences add essential context without fluff, and the return format is clearly separated. Every sentence earns its place.

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?

Since there is no output schema, the manual return-type documentation is essential and present. The description also covers prerequisites, related tools, and security handling, making it fully sufficient for a zero-parameter read-only tool.

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 tool has zero parameters and the schema is empty, so there is nothing to document. The description appropriately focuses on the return value instead, matching the baseline for a 0-parameter tool.

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 a specific verb and resource: "Return the swarm's current unlock key." It distinguishes itself from related tools like swarm_unlock by framing the key's purpose in the autolock lifecycle, and the tool name alone is unambiguous.

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?

It explicitly states when the key matters (autolock enabled), the precondition for calling it (must be against an unlocked manager), and how the result should be used (fed to swarm_unlock). It also warns that a locked manager cannot serve this request, giving the agent a clear when-not-to-use condition.

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