Skip to main content
Glama

service_rollback

Rolls back a Docker swarm service to its previous configuration, restoring the prior spec after an update or scale.

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
Behavior4/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, and the description aligns with that. It adds valuable behavioral context: it re-applies PreviousSpec, raises ValueError if no PreviousSpec, and explains the low-level API mechanism. It also discloses the return format (dict with Warnings key), providing transparency beyond 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 front-loaded with the main purpose and efficiently covers behavior, error condition, implementation notes, args, and returns. It is slightly wordy (implementation detail about APIClient), but every sentence adds useful information and no content is wasted.

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?

Given the tool's simplicity (1 param, no output schema), the description covers the essential aspects: what it does, how it works, potential error, and return value. It is complete enough 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must define the parameter. It clearly states 'id_or_name - The service id or name', which fully explains the single parameter. This compensates for the schema's lack of description.

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 and resource: 'Roll a swarm service back to its previous spec', explicitly naming the docker equivalent. It distinguishes itself from siblings like service_update and service_scale by focusing on reverting to a prior spec.

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 provides clear context for when to use this tool (when a rollback is needed) and states a precondition (PreviousSpec must exist, otherwise ValueError). It does not explicitly name alternative tools for exclusions, but the context is sufficient to avoid confusion with service_update or service_scale.

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