Skip to main content
Glama

docker_run

Run Docker containers with configurable options like ports, volumes, environment variables, and resource limits to execute applications in isolated environments.

Instructions

Run a Docker container

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesDocker image to run
nameNoContainer name
commandNoCommand to run in container
argsNoCommand arguments
portsNoPort mappings (e.g., ["8080:80", "3000:3000"])
volumesNoVolume mounts (e.g., ["/host/path:/container/path"])
envNoEnvironment variables as key-value pairs
detachNoRun container in background
removeNoRemove container when it exits
interactiveNoKeep STDIN open
ttyNoAllocate a pseudo-TTY
networkNoNetwork to connect container to
working_dirNoWorking directory inside container
userNoUsername or UID (format: <name|uid>[:<group|gid>])
memoryNoMemory limit (e.g., "512m", "2g")
cpusNoCPU limit (e.g., "0.5", "2")
restartNoRestart policy (no, on-failure, always, unless-stopped)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.4/5.0
Behavior1/5

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

With no annotations and only a one-line description, the tool fails to disclose important behaviors such as image pulling, blocking vs detached execution, container cleanup policies, or output format. The description carries the full burden but provides no behavioral context.

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

Conciseness2/5

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

The description is a single sentence, but it is under-specified for the tool's complexity. It does not earn its place by providing unique value; it merely repeats the name.

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

Completeness1/5

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

For a tool with 17 parameters, nested objects, and no output schema, the description is severely lacking. It omits return values, side effects, prerequisites, and execution behavior, making it insufficient for proper tool selection and invocation.

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 coverage is 100% with detailed descriptions for all 17 parameters. The description adds no additional meaning beyond the schema, so baseline 3 applies.

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 'Run a Docker container' clearly identifies the tool's action and resource, distinguishing it from sibling tools like docker_build or docker_cleanup. However, it is a near tautology of the tool name, which slightly reduces clarity.

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?

The description provides no guidance on when to use this tool versus alternatives (e.g., docker_compose for multi-container apps) or any context about prerequisites or scenarios where it is appropriate.

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