Skip to main content
Glama

service_scale

Scale a Docker Swarm service by setting the desired replica count for Replicated-mode services. Returns once the scale request is accepted, not when tasks finish.

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?

Discloses that the call returns once the update is accepted, not when tasks are running, and that scaling is applied asynchronously. This goes beyond the metadata's readOnlyHint/destructiveHint by explaining execution semantics.

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 well-structured with a one-line purpose, followed by operational details, alternatives, and a clean args/returns block. Every sentence contributes value without repetition.

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 the tool's scope, constraints (Replicated-only), async behavior, related tools for monitoring, and return semantics. Given the simple parameter set, nothing critical is missing.

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 explains that id_or_name is a service identifier and replicas is the desired count, which the schema only types as string/integer without descriptions. It adds the essential meaning for both parameters, but could slightly elaborate on constraints like non-negative replicas.

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, using a specific verb and resource. It distinguishes itself from service_update by noting that other spec changes should use that tool instead.

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: for Replicated services only, and provides alternatives for other spec changes (service_update) and progress checking (service_ps, service_inspect). This gives the agent clear selection criteria.

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