Skip to main content
Glama

Docker service create

docker_service_create

Create a Docker Swarm service from a specified image and service name, with optional ports, replicas, and target context for multi-context deployments.

Instructions

Create a service (real services.create via :meth:create_service).

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_name": "<service_name>",
      "image": "<image>"
    },
    "name": "docker_service_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYes
portsNo
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
replicasNo
service_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the write/non-destructive/external-effect profile is covered structurally. The description adds nothing beyond that: it does not say what state is created, whether an existing service with the same name fails or is replaced, whether the swarm must be initialized, or what a success response looks like. The parenthetical merely asserts the call is "real", which is weak added context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short and front-loads the verb, which is good, but a substantial fraction of the text is Sphinx-style markup noise (:meth:`create_service`, services.create) that costs tokens without informing tool selection. Efficient in length, poor in information density.

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

Completeness2/5

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

For a mutation tool that creates externally visible infrastructure with 5 parameters, no output schema, and only a thin annotation set, the description is far too sparse. It omits swarm/prerequisite requirements, conflict behavior on duplicate names, port mapping format, and what is returned, all of which an agent needs before invoking it.

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 description coverage is only 20% (just `context`), and the description supplies zero parameter meaning: it never explains `image` format, what `ports` entries should look like, what `replicas` defaults/limits mean, or naming rules for `service_name`. With 5 parameters and low coverage, the description was obligated to compensate and does not.

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

Purpose3/5

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

The description says "Create a service", which is a recognizable verb+resource, so the basic action is clear. However, it does not distinguish this from the near-identically named sibling docker_create_service, and the parenthetical "real services.create via create_service" is an internal implementation reference that tells an agent nothing useful about scope or target.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of prerequisites (e.g. an active swarm), and no hint about how to choose between this tool and docker_create_service or the Kubernetes service-creation siblings. The only contextual clue, the `context` parameter, is documented solely in the schema, not in the description.

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