Skip to main content
Glama

service_rollback

Roll back a Docker swarm service to its previous specification using the service ID or name. Reapplies the spec before the most recent update.

Instructions

Roll a swarm service back to its previous spec (the docker service rollback equivalent).

Re-applies the service's PreviousSpec — the spec from before the most recent service_update / service_scale. Raises ValueError if the service has no PreviousSpec (it has never been updated, or was already rolled back). The high-level SDK exposes no rollback, so this reads the current version and previous spec via the low-level APIClient and submits them with the low-level update_service API call.

args: id_or_name - The service id or name returns: dict - The daemon response (a dict with a "Warnings" key)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes
Behavior5/5

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

The description fully discloses behavior: it is a write operation (modifies service state), explains internal mechanism (low-level API call), mentions error conditions (ValueError), and provides return format. No contradiction with annotations.

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 informative but somewhat lengthy; it explains the rollback concept and implementation. Could be slightly more concise, but the front-loaded key purpose is clear.

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 no output schema, the description provides return format and error handling. It covers the single parameter, behavior, and limitations, making it complete for the tool's complexity.

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 description explicitly defines the only parameter 'id_or_name' as 'The service id or name', adding meaning beyond the schema's type string. Although schema coverage is 0%, the parameter description is adequate.

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 'Roll a swarm service back to its previous spec' with a specific verb and resource. It distinguishes itself from sibling tools like service_update and service_scale by explicitly being a rollback operation.

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 works (if PreviousSpec exists) and raises ValueError otherwise. It implies usage after an update/scale but does not explicitly contrast with alternatives like manually reverting via service_update.

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