Skip to main content
Glama

container_create

Create a container from an image without starting it, allowing configuration before first start or separate create/start steps.

Instructions

Create a container from an image without starting it.

Use this when you need to configure a container (with extra_kwargs) before its first start, or want creation and start as separate observable steps. For the common case of create-then-start-immediately use container_run instead — it does both in one call. Start the created container with container_start. Common extra_kwargs keys: name (str), environment (list of "KEY=VAL" or dict), ports (dict, e.g. {"80/tcp": 8080}), volumes (dict, e.g. {"/host/path": {"bind": "/container/path", "mode": "rw"}}), labels (dict). For anything else docker-py's ContainerCollection.create accepts, call docs_lookup(section="containers") rather than guessing a key name.

args: image - Image to create the container from, e.g. "nginx:alpine" command - Override the image's default command; string or list of strings extra_kwargs - Additional docker-py ContainerCollection.create keyword arguments returns: dict - The created container's attrs (not yet running)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYes
commandNo
extra_kwargsNo
Behavior5/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, but the description adds essential behavioral context: the container is created but not started, and it returns the container's attrs. It also clarifies the 'extra_kwargs' behavior and points to docs_lookup for unknown keys, giving the agent a fallback path. This goes well beyond the annotations.

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 and every sentence earns its place. It opens with a one-sentence purpose, then gives usage guidance with clear alternatives, then parameter explanations. No redundancy or fluff, despite covering many details.

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?

The tool is well-covered given its complexity. No output schema exists, but the description states the return type (dict of container attrs) and notes it is 'not yet running.' It includes all necessary behavioral details, alternatives, and a docs_lookup fallback. Complete for an AI agent to use correctly.

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?

Despite 0% schema description coverage, the description fully compensates. It explains 'image' with an example, 'command' as string or list, and 'extra_kwargs' with a detailed list of common keys and format examples for ports and volumes. This is far beyond minimum viability.

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 purpose is crystal clear: 'Create a container from an image without starting it.' It uses a specific verb and resource, and immediately distinguishes itself from container_run (create+start) and container_start (start only).

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?

The description explicitly states when to use this tool: 'when you need to configure a container before its first start, or want creation and start as separate observable steps.' It also names the alternative container_run for the common create-then-start case, and tells the agent to use container_start to start the container. This is ideal usage guidance.

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