Skip to main content
Glama

service_scale

Set the desired number of task replicas for a Replicated-mode Docker Swarm service. The swarm scheduler asynchronously adjusts tasks to match the specified count.

Instructions

Set the desired replica count for a Replicated-mode swarm service.

Only applies to services in Replicated mode; a Global service runs one task per eligible node and has no replica count to set. The swarm scheduler places or removes tasks asynchronously to converge on the new count — this call returns once the update is accepted, not once every task is running. Check progress with service_ps or service_inspect. For any other spec change (image, env, resources) use service_update instead.

args: id_or_name - The service id or name replicas - The desired number of running task replicas returns: bool - True once the scale request is accepted

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
replicasYes
id_or_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Description discloses asynchronous behavior—'the swarm scheduler places or removes tasks asynchronously—this call returns once the update is accepted, not once every task is running.' This adds value beyond the annotations (readOnlyHint: false, destructiveHint: false), which only indicate a non-read, non-destructive operation. No contradiction.

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 concise—one paragraph plus arg/return definitions. It front-loads the primary purpose, then adds necessary behavioral details and usage guidance. No superfluous sentences; every part 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?

Given the tool's complexity (asynchronous scale operation with mode restrictions), the description covers all essential aspects: applicability, behavior, return value, and alternative tools. It is complete even without an output schema, as it explicitly states the return type.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

Schema description coverage is 0%, but the description compensates by explaining each parameter: 'id_or_name - The service id or name' and 'replicas - The desired number of running task replicas.' It also documents the return value as bool, which is absent from the output schema. This provides critical meaning beyond the raw types.

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 'Set the desired replica count for a Replicated-mode swarm service.' It specifies the verb (set), resource (replica count), and mode (Replicated-mode), and distinguishes from sibling tools like service_update.

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?

Description explicitly states this tool only applies to Replicated-mode services, not Global services, and directs to use service_update for other spec changes. It also advises checking progress with service_ps or service_inspect, providing clear when/when-not/alternatives.

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