Skip to main content
Glama

docker_run_container

Run a Docker image in a new container with options for ports, volumes, environment variables, networking, and detached execution.

Instructions

Run an image in a new Docker container (preferred over docker_create_container + docker_start_container)

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": {
      "image": "<image>"
    },
    "name": "docker_run_container"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoContainer name
imageYesDocker image name
portsNoContainer-to-host port bindings
detachNoRun container in the background
labelsNoContainer labels
commandNoCommand to run in container
networkNoNetwork to attach the container to
volumesNoVolume mappings
entrypointNoEntrypoint to run in container
auto_removeNoAutomatically remove the container
environmentNoEnvironment variables dictionary

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the safety profile is covered. The description adds only the implicit point that a 'new' container is created per call (consistent with idempotentHint=false), but says nothing about port conflicts, auto-removal, or background execution behavior.

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?

A single sentence with the action front-loaded and the alternative guidance parenthetical. Zero waste.

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?

With 11 parameters, an output schema, and annotations present, the structured fields cover most of what an agent needs. However, for a container-launch tool the description omits any note on detach defaults, port binding conflicts, or the lifecycle implication of running with auto_remove, leaving it merely adequate.

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

Parameters3/5

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

Schema description coverage is 100%, with all 11 parameters documented including defaults, so the schema carries the semantic load. The description mentions no parameter behavior beyond the image itself, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('Run an image in a new Docker container') and explicitly names the sibling combination it replaces. An agent can distinguish it from docker_create_container and docker_start_container without opening any schema.

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

Usage Guidelines4/5

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

Gives an explicit preference: use this rather than docker_create_container plus docker_start_container. It does not explain the converse case (when staging via create/start separately is warranted), but the routing guidance is clear and actionable.

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