Skip to main content
Glama

Update service

docker_update_service

Update a container service in place while preserving unspecified spec fields so environment variables, mounts, and networks are not reset to defaults.

Instructions

Update a service in place, preserving unspecified spec fields.

Performs a read-modify-write of the full service spec so that env, mounts, networks and other settings are not reset to defaults (the footgun of the high-level Service.update).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "service_id": "<service_id>"
    },
    "name": "docker_update_service"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
forceNo
imageNo
labelsNo
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
replicasNo
service_idYes
constraintsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=true, which is a thin safety profile. The description adds the genuinely important behavioral fact that this is a read-modify-write over the full spec, so omitted fields are preserved rather than defaulted - exactly the kind of consequence an agent needs before mutating a service.

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?

Two front-loaded sentences with the key guarantee stated first and the rationale second; nothing is padded. The parenthetical library reference is slightly implementation-flavoured but earns its place by explaining why the tool exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter mutation with no output schema and low schema coverage, the definition covers the core semantic promise but leaves parameter behaviour and result/failure behaviour unstated. An agent could invoke it correctly for simple field updates but would be guessing about force, replicas, and constraints.

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

Parameters2/5

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

Schema coverage is only 13% (just the context parameter), so the description carries the burden, and it does not explain force, replicas, labels, constraints, or the env format. It also references 'mounts, networks and other settings' that are not parameters in the schema, which can mislead an agent about what can be set in this call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Update a service in place') and adds the defining trait that unspecified spec fields are preserved. It implicitly distances itself from the higher-level 'Service.update' footgun, though that is a library method rather than a sibling tool name, so differentiation from docker_service_update or docker_scale_service is not explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the stated guarantee: use this when you want to change some fields without resetting the rest. There is no explicit when-not guidance, no mention of alternatives such as a dedicated scale tool for replica changes, and no stated prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools