docker_container
MCP tools › Containers and Kubernetes
One Docker container: logs (tail, since, pattern with case_sensitive/whole_word/regex: matching lines and count), inspect (env, ports, mounts, labels, inspect JSON; secrets masked), top (processes); files (path, default /) and read_file (path, first 256 KiB) read inside the running container and need the run right; start, stop (10 s grace), restart, remove (also when running), pause, unpause default to dry_run=true; dry_run=false needs the 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_container |
|---|---|
| Area | Containers and Kubernetes |
| Access | changes processes |
| Reaches | network |
| Rights | run |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
containerrequired | string | Container name or id. |
actionrequired | string | logs, inspect, start, stop, restart, remove, pause, unpause, top, files
or read_file. |
path | string | For files (default /) and read_file: an absolute path inside the container. |
tail | integer | Lines of output for logs (default 200, at most 5000).minimum 0 |
since | string | For logs: only output since then — Unix seconds, an RFC 3339 time, or 30s, 10m,
2h, 1d back from now. |
pattern | string | For logs: only the lines that match this text (or expression with regex). |
case_sensitive | boolean | For pattern: upper and lower case differ (default false). |
whole_word | boolean | For pattern: only whole words (default false). |
regex | boolean | For pattern: it is a regular expression (default false). |
dry_run | boolean | For the changing actions: only report what would happen (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_container '{"container":"<string>","action":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "container", "action" ], "properties": { "container": { "description": "Container name or id.", "type": "string" }, "action": { "description": "`logs`, `inspect`, `start`, `stop`, `restart`, `remove`, `pause`, `unpause`, `top`, `files`\nor `read_file`.", "type": "string" }, "path": { "description": "For `files` (default `/`) and `read_file`: an absolute path inside the container.", "type": [ "string", "null" ] }, "tail": { "description": "Lines of output for `logs` (default 200, at most 5000).", "type": [ "integer", "null" ], "minimum": 0 }, "since": { "description": "For `logs`: only output since then — Unix seconds, an RFC 3339 time, or `30s`, `10m`,\n`2h`, `1d` back from now.", "type": [ "string", "null" ] }, "pattern": { "description": "For `logs`: only the lines that match this text (or expression with `regex`).", "type": [ "string", "null" ] }, "case_sensitive": { "description": "For `pattern`: upper and lower case differ (default false).", "type": [ "boolean", "null" ] }, "whole_word": { "description": "For `pattern`: only whole words (default false).", "type": [ "boolean", "null" ] }, "regex": { "description": "For `pattern`: it is a regular expression (default false).", "type": [ "boolean", "null" ] }, "dry_run": { "description": "For the changing actions: only report what would happen (default true).", "type": [ "boolean", "null" ] }, "engine": { "description": "Engine by name or address.", "type": [ "string", "null" ] } }}