docker_exec
Runs one command inside a running container with a preview and confirmation step, optionally using shell, workdir, or user settings.
Instructions
Run one command inside a running container (no terminal, no input).
Destructive, because the command can do anything inside the container.
Shows a preview first. Run again with confirm=true after the user says yes.
By default the command is split like a shell would, but no shell is used
(no pipes). Set shell=true to run it with sh -c (pipes, &&, redirects).
workdir sets the folder inside the container. user sets the user.
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": {
"container": "<container>",
"command": "<command>"
},
"name": "docker_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | ||
| user | No | ||
| shell | No | ||
| command | Yes | ||
| confirm | No | ||
| workdir | No | ||
| container | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |