docker_exec
MCP tools › Containers and Kubernetes
Runs one command (an argument list, no host shell) inside a running Docker container without a TTY and returns stdout and stderr in order, the exit code and whether output was cut at 1 MiB. Optional workdir, env (NAME=value), user, timeout_s (default 60, at most 600), engine. Defaults to dry_run=true, which only reports what would run; dry_run=false needs the user-granted run right and is logged in .ferris-idea/agent-log.jsonl.
Its results carry text from process: the client is told to treat that as data, never as instructions.
| Capability | containers.docker_exec |
|---|---|
| Area | Containers and Kubernetes |
| Access | changes processes |
| Reaches | process, network |
| Rights | run |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
containerrequired | string | Container name or id (must be running). |
commandrequired | array of string | The command as an argument list, e.g. ["ls", "-l", "/srv"]. |
workdir | string | Working folder inside the container. |
env | array of string | Environment entries NAME=value. |
user | string | User (name or uid, optionally :group). |
timeout_s | integer | Time limit in seconds (default 60, at most 600).minimum 0 |
dry_run | boolean | Only report what would run (default true). |
engine | string | Engine by name or address. |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project docker_exec '{"container":"<string>","command":[]}'Input schema as JSON
{ "type": "object", "required": [ "container", "command" ], "properties": { "container": { "description": "Container name or id (must be running).", "type": "string" }, "command": { "description": "The command as an argument list, e.g. `[\"ls\", \"-l\", \"/srv\"]`.", "type": "array", "items": { "type": "string" } }, "workdir": { "description": "Working folder inside the container.", "type": [ "string", "null" ] }, "env": { "description": "Environment entries `NAME=value`.", "type": [ "array", "null" ], "items": { "type": "string" } }, "user": { "description": "User (name or uid, optionally `:group`).", "type": [ "string", "null" ] }, "timeout_s": { "description": "Time limit in seconds (default 60, at most 600).", "type": [ "integer", "null" ], "minimum": 0 }, "dry_run": { "description": "Only report what would run (default true).", "type": [ "boolean", "null" ] }, "engine": { "description": "Engine by name or address.", "type": [ "string", "null" ] } }}