Skip to main content
Glama

rollback_service

Revert a Docker Swarm service to its previous specification. Use this to undo recent updates that introduced problems.

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 update_service / scale_service / force_update_service. 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 update_service.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
service_idYes
Behavior4/5

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

Annotations are minimal (readOnlyHint=false, destructiveHint=false). Description adds value by explaining the internal process (reads PreviousSpec via low-level APIClient) and return format (dict with 'Warnings' key). It also warns about ValueError for missing PreviousSpec.

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?

Description is concise at three sentences, but includes some technical detail about the low-level APIClient that may not be essential for an AI agent. Still, it is clear and well-structured.

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's simplicity (one param, straightforward action), the description covers purpose, usage conditions, behavioral details, and return value. No output schema exists, but the description adequately explains the response. Context is complete.

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?

Only one parameter (service_id) with 0% schema description coverage. Description adds that it accepts 'the service id or name', providing clarity beyond the bare schema. For a single required param, this 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?

Description clearly states the tool rolls back a swarm service to its previous spec, using the verb 'roll' and specifying the resource 'swarm service'. It distinguishes from sibling tools like update_service, scale_service, and force_update_service by referencing the PreviousSpec mechanism.

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?

Description explains when to use (to rollback a service) and provides a condition: raises ValueError if service has no PreviousSpec. It implicitly advises not to use if service hasn't been updated. However, it does not explicitly state alternatives or when not to use.

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