Skip to main content

Tools

This server has 47 tools. This page is generated from the server itself, so it lists them exactly as your AI app gets them, with the descriptions the agent reads. You don't call tools yourself: you ask in your own words, and the agent picks them.

ToolWhat it doesOnly reads
server_infoServer info✓
check_requirementsCheck the programs this server needs✓
docker_infoDocker's information✓
disk_usageDocker's disk usage✓
pruneClean up Docker
list_containersList containers✓
inspect_containerInspect a container✓
container_logsA container's logs✓
container_statsContainers' resource usage✓
container_processesA container's processes✓
run_containerRun a container
start_containerStart a container
stop_containerStop a container
restart_containerRestart a container
remove_containerRemove a container
exec_in_containerRun a command in a container
copy_to_containerCopy files into a container
copy_from_containerCopy files out of a container
list_imagesList images✓
inspect_imageInspect an image✓
pull_imagePull an image
build_imageBuild an image
tag_imageTag an image
push_imagePush an image
remove_imageRemove an image
list_volumesList volumes✓
inspect_volumeInspect a volume✓
create_volumeCreate a volume
remove_volumeRemove a volume
list_networksList networks✓
inspect_networkInspect a network✓
create_networkCreate a network
remove_networkRemove a network
compose_psA Compose project's services✓
compose_logsA Compose project's logs✓
compose_buildBuild a Compose project
compose_upStart a Compose project
compose_downStop a Compose project
compose_execRun a command in a Compose service
list_labsList the labs✓
lab_statusA lab's status✓
lab_logsA lab's logs✓
lab_upStart a lab
lab_execRun a command in a lab
lab_checkCheck a lab
lab_resetReset a lab
lab_downStop a lab

server_info​

Server info

Show this server's name, version, mode (read, lab or full) and areas, its labs and data folders, and whether Docker is there. Contains no secrets.

No inputs.

check_requirements​

Check the programs this server needs

Check the programs this server needs installed apart on the person's computer: whether each is there, its version, and, when one is missing or too old, how to install it on this system. Never installs anything: tell the person what to do.

No inputs.

docker_info​

Docker's information

Docker's version, the engine's operating system and architecture, its CPUs and memory, and how many containers (running, stopped) and images there are. A first call to check Docker is up.

No inputs.

disk_usage​

Docker's disk usage

How much disk Docker uses for images, containers, volumes and the build cache, and how much of it could be reclaimed by prune.

No inputs.

prune​

Clean up Docker

Remove what isn't in use: stopped containers, dangling images (all unused ones with allImages), unused networks, unused volumes (only when volumes is true: their data is gone) and the build cache. Says how much space it freed. Can't be undone: confirm with the person first, naming what goes.

InputRequiredTypeDescription
what✅containers, images, networks, volumes, build-cache, everythingeverything: containers, networks, dangling images and build cache (volumes only with volumes: true)
allImagesbooleanImages: every unused one, not only the dangling ones
volumesbooleaneverything: also unused volumes and their data

list_containers​

List containers

List Docker containers, running or not (all unless running is true): id, name, image, state, status and ports. Names and ids are what the other container tools take.

InputRequiredTypeDescription
runningbooleanOnly the running ones

inspect_container​

Inspect a container

A container's details: image, command, state (with its exit code), ports, mounts, networks and labels, and the names of its environment variables (never their values, which may hold secrets).

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it

container_logs​

A container's logs

A container's last log lines (stdout and stderr), 200 by default; the start is left out when they're very long.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it
tailintegerHow many lines from the end
sincestringOnly since then: a timestamp, or a duration like 10m

container_stats​

Containers' resource usage

What containers consume right now, one snapshot (not a stream): CPU, memory (used, limit, percent), network and disk I/O, and processes. All running containers, or the ones named; a stopped one shows zeros. Use it to answer why the computer is slow or which container uses the most; container_processes shows what runs inside one.

InputRequiredTypeDescription
containersstring listOnly these containers; all running ones when missing

container_processes​

A container's processes

The processes running inside a container (docker top): their user, PID, start time, CPU time and command, with the columns Docker gives. The container must be running.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it

run_container​

Run a container

Create and start a container from an image (pulled if missing), in the background unless detach is false. Dangerous options (privileged, the host's network, processes or IPC, extra capabilities, devices, mounting the Docker socket, the host's root or the person's home) are refused unless confirmedDangerous is true: ask the person first, naming what they give the container. Changes the machine: confirm with the person first.

InputRequiredTypeDescription
image✅stringThe image, e.g. nginx:1.27 or postgres:17
namestring
commandstring listThe command and its arguments, one per item; the image's when missing
envobjectEnvironment variables
portsstring listPublished ports, "host:container", e.g. "8080:80"; "127.0.0.1:8080:80" to keep them on this computer
volumesstring listMounts, "named-volume:/path" or "/host/path:/path[:ro]"
networkstringA network to join
workdirstring
detachbooleanIn the background (default); false waits for it to finish and returns its output
removebooleanRemove it when it stops
restartno, on-failure, unless-stopped, always
privilegedboolean
capAddstring list
devicesstring list
pidstring
ipcstring
confirmedDangerousbooleanThe person confirmed the dangerous options, knowing what they give the container

start_container​

Start a container

Start an existing container. Confirm with the person first.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it

stop_container​

Stop a container

Stop an existing container (it gets 10 seconds to stop cleanly). Confirm with the person first.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it

restart_container​

Restart a container

Restart an existing container. Confirm with the person first.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it

remove_container​

Remove a container

Remove a container, with force to stop it first if it's running, and with volumes to remove its anonymous volumes. Its data is gone: confirm with the person first, naming it.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it
forceboolean
volumesboolean

exec_in_container​

Run a command in a container

Run a command in a running container and return its exit code and output (stdout and stderr together), stopped after timeoutSeconds. The command is a list, one argument per item; for a shell line, use ["sh", "-c", "…"]. Can change the container: confirm with the person first unless it only reads.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it
command✅string list
workdirstring
userstring
envobject
timeoutSecondsinteger

copy_to_container​

Copy files into a container

Copy a local file or folder into a container's path. Overwrites what's there: confirm with the person first.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it
from✅stringA local file or folder (absolute path)
to✅stringThe path in the container

copy_from_container​

Copy files out of a container

Copy a container's file or folder to a local path. Overwrites what's there locally: confirm with the person first.

InputRequiredTypeDescription
container✅stringThe container's name or id, as its list gives it
from✅stringThe path in the container
to✅stringA local path (absolute)

list_images​

List images

List the local Docker images: id, repository, tag, size and when each was created.

InputRequiredTypeDescription
danglingbooleanOnly untagged images left by builds

inspect_image​

Inspect an image

An image's details: tags, size, architecture, the command and entry point it runs, its exposed ports, working directory, volumes and labels.

InputRequiredTypeDescription
image✅stringThe image's name or id, as its list gives it

pull_image​

Pull an image

Download an image from its registry (Docker Hub unless it names another), e.g. postgres:17. Uses the network and disk: confirm with the person first.

InputRequiredTypeDescription
image✅stringThe image, with its tag: nginx:1.27, ghcr.io/owner/name:tag

build_image​

Build an image

Build an image from a local folder with a Dockerfile, and tag it. Returns the build's output (its end when long). Uses the network and disk: confirm with the person first.

InputRequiredTypeDescription
context✅stringThe build's folder (absolute path)
tag✅stringThe tag to give it, e.g. my-app:1.0
dockerfilestringThe Dockerfile, when it isn't the context's Dockerfile
buildArgsobject
noCacheboolean

tag_image​

Tag an image

Give an image another name and tag (the image itself isn't copied). Confirm with the person first.

InputRequiredTypeDescription
image✅stringThe image's name or id, as its list gives it
tag✅stringThe new name:tag

push_image​

Push an image

Upload a local image to its registry: Docker Hub unless its name starts with another (ghcr.io/owner/name:tag); give it that name first with tag_image. It publishes the image, maybe publicly: confirm with the person first, naming the registry and the tag. It uses the login the person made themselves with docker login; without one, it says what they must run in their own terminal. Never ask for their password or token.

InputRequiredTypeDescription
image✅stringThe image with its registry, name and tag, e.g. ghcr.io/owner/app:1.0

remove_image​

Remove an image

Remove a local image (with force, even if a stopped container uses it). It has to be pulled or built again to be used: confirm with the person first, naming it.

InputRequiredTypeDescription
image✅stringThe image's name or id, as its list gives it
forceboolean

list_volumes​

List volumes

List Docker volumes: name, driver and where it lives.

No inputs.

inspect_volume​

Inspect a volume

A volume's details: driver, mount point, labels and when it was created.

InputRequiredTypeDescription
volume✅stringThe volume's name or id, as its list gives it

create_volume​

Create a volume

Create a named volume, for data that outlives a container. Confirm with the person first.

InputRequiredTypeDescription
name✅string

remove_volume​

Remove a volume

Remove a volume and every file in it. Can't be undone: confirm with the person first, naming it.

InputRequiredTypeDescription
volume✅stringThe volume's name or id, as its list gives it

list_networks​

List networks

List Docker networks: id, name, driver and scope.

No inputs.

inspect_network​

Inspect a network

A network's details: driver, subnet, whether it's internal, and the containers attached.

InputRequiredTypeDescription
network✅stringThe network's name or id, as its list gives it

create_network​

Create a network

Create a network, internal if it shouldn't reach the outside. Confirm with the person first.

InputRequiredTypeDescription
name✅string
internalboolean

remove_network​

Remove a network

Remove a network (no container may be attached). Confirm with the person first.

InputRequiredTypeDescription
network✅stringThe network's name or id, as its list gives it

compose_ps​

A Compose project's services

The services of a Compose project and their containers' state.

InputRequiredTypeDescription
folder✅stringThe Compose project's folder (absolute path), where its compose.yaml is
filestringIts compose file, when it isn't the folder's compose.yaml

compose_logs​

A Compose project's logs

The last log lines of a Compose project's services (or one), 200 per service by default.

InputRequiredTypeDescription
folder✅stringThe Compose project's folder (absolute path), where its compose.yaml is
filestringIts compose file, when it isn't the folder's compose.yaml
servicestring
tailinteger

compose_build​

Build a Compose project

Build the images of a Compose project's services that have a build (all, or some), without starting anything: to check a Dockerfile change, or to have the images ready. Returns the exit code and the build's output (its end when long); a failed build says why at the end. Uses the network and disk: confirm with the person first.

InputRequiredTypeDescription
folder✅stringThe Compose project's folder (absolute path), where its compose.yaml is
filestringIts compose file, when it isn't the folder's compose.yaml
servicesstring listOnly these services; all with a build when missing
noCachebooleanBuild every step again, ignoring the cache
pullbooleanPull newer versions of the base images first

compose_up​

Start a Compose project

Start a Compose project's services in the background (building what has a build), or only some. Runs whatever its compose file says, privileged services and host mounts included: read it first and confirm with the person, naming anything dangerous in it.

InputRequiredTypeDescription
folder✅stringThe Compose project's folder (absolute path), where its compose.yaml is
filestringIts compose file, when it isn't the folder's compose.yaml
servicesstring list
buildboolean

compose_down​

Stop a Compose project

Stop and remove a Compose project's containers and networks; with volumes, its volumes and their data too. Confirm with the person first, saying whether the data goes.

InputRequiredTypeDescription
folder✅stringThe Compose project's folder (absolute path), where its compose.yaml is
filestringIts compose file, when it isn't the folder's compose.yaml
volumesboolean

compose_exec​

Run a command in a Compose service

Run a command in a running service of a Compose project, returning its exit code and output. The command is a list; for a shell line, ["sh", "-c", "…"]. Can change the service: confirm with the person first unless it only reads.

InputRequiredTypeDescription
folder✅stringThe Compose project's folder (absolute path), where its compose.yaml is
filestringIts compose file, when it isn't the folder's compose.yaml
service✅string
command✅string list
timeoutSecondsinteger

list_labs​

List the labs

List the labs: practices in the labs folder (/home/runner/.docker-mcp/labs), each a folder with its compose.yaml and, optionally, a lab.json with the check that says whether it works.

No inputs.

lab_status​

A lab's status

A lab's services and their containers' state (empty when it isn't running).

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it

lab_logs​

A lab's logs

The last log lines of a lab's services (or one), 200 per service by default.

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it
servicestringOne of the lab's services, as lab_status gives them
tailinteger

lab_up​

Start a lab

Start a lab under lab mode's policy: no privileged services, no host mounts but the lab's own folder, never the Docker socket, limits of 1 CPU and 512m per service, without internet (so the host can't reach its ports either: check it from inside with lab_exec). A lab that breaks the policy is refused with the reason. Confirm with the person first, saying what it will run (its services and images).

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it

lab_exec​

Run a command in a lab

Run a command in one of a running lab's services, returning its exit code and output. The command is a list; for a shell line, ["sh", "-c", "…"]. Can change the lab: confirm with the person first unless it only reads.

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it
service✅stringOne of the lab's services, as lab_status gives them
command✅string list
timeoutSecondsinteger

lab_check​

Check a lab

Run the lab's check (its lab.json) in its running service: passed when it exits 0, with its output to explain what failed. For a teacher, whether a statement or a solution works; for a student, whether their practice does. Runs inside the lab: confirm with the person first.

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it

lab_reset​

Reset a lab

Back to a clean start: the lab's containers, networks and volumes are removed (what was done inside them is lost; the files in its folder stay) and it starts again. Confirm with the person first.

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it

lab_down​

Stop a lab

Stop a lab and remove its containers, networks and volumes (what was done inside them is lost; the files in its folder stay). Confirm with the person first.

InputRequiredTypeDescription
lab✅stringThe lab's name, as list_labs gives it