Skip to main content
Glama

docker_run

Starts a new Docker container in the background with configurable image, ports, volumes, environment, and network; requires confirmation before running.

Instructions

Start a new container in the background (docker run -d). Needs confirm=true.

For anything that should stay, a compose stack (docker_stack_write) is better. ports like "8080:80" or "127.0.0.1:8080:80/tcp". volumes like "myvol:/data" or "/opt/stacks/app/data:/data:ro" (a host folder must be in an allowed folder). Not possible here: privileged mode, devices, the docker socket.

Input Schema

NameRequiredDescriptionDefault
envNo
hostNo
nameNo
userNo
imageYes
portsNo
commandNo
confirmNo
networkNo
restartNounless-stopped
volumesNo
workdirNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses detached/background execution, the confirm gate, the allowed-folder constraint for host volumes, and prohibited capabilities (privileged mode, devices, docker socket). It does not mention image-pull behavior or what happens on name collisions, but the output schema covers returns.

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?

Front-loads the core action and confirm requirement, then follows with the compose alternative, parameter syntax, and hard restrictions. Every clause adds information; nothing is redundant.

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 a 12-parameter mutation tool with zero annotation coverage, the description covers execution mode, safety gate, volume restrictions, and an alternative tool, which is substantial. However, half the parameters (host, network, restart, user, workdir, env, command, name) remain unexplained in either schema or description.

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 0% across 12 parameters, so the description must compensate. It gives concrete syntax for the trickiest parameters (ports like '8080:80', volumes like 'myvol:/data') and explains confirm, but leaves env, host, name, user, command, network, restart, and workdir completely undocumented.

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?

States a specific verb and resource: 'Start a new container in the background (docker run -d).' It distinguishes itself from docker_stack_write as the ephemeral alternative, but does not differentiate from sibling docker_create or docker_cli, which also create containers.

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?

Explicitly names the alternative ('For anything that should stay, a compose stack (docker_stack_write) is better') and states the mandatory confirm=true requirement. It lacks guidance on when to use docker_create or docker_cli instead.

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