Skip to main content
Glama

service_scale

Set the desired number of running replicas for a Replicated-mode Docker Swarm service. Returns once the update is accepted.

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?

Describes asynchronous task placement/removal and that the call returns once accepted, not when tasks are running. Annotations are minimal (readOnlyHint=false, destructiveHint=false), so the description adds essential behavioral context.

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?

Concise: front-loads main purpose, then constraints, then behavior, then alternatives. No wasted words.

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?

Covers mode condition, async behavior, return value, and alternatives. Output schema exists (bool), so return value explanation is sufficient. All key aspects addressed.

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%, but the description lists both parameters (id_or_name, replicas) with brief explanations, adding meaning beyond the bare 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?

The description clearly states the tool sets the desired replica count for a Replicated-mode swarm service, distinguishing it from Global mode and siblings 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?

Explicitly states when to use (Replicated mode), when not (Global service), and points to service_update for other changes. Also suggests checking progress with service_ps or service_inspect.

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