Skip to content

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.

Capabilitycontainers.docker_container
AreaContainers and Kubernetes
Accesschanges processes
Reachesnetwork
Rightsrun
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
containerrequiredstringContainer name or id.
actionrequiredstringlogs, inspect, start, stop, restart, remove, pause, unpause, top, files or read_file.
pathstringFor files (default /) and read_file: an absolute path inside the container.
tailintegerLines of output for logs (default 200, at most 5000).minimum 0
sincestringFor logs: only output since then — Unix seconds, an RFC 3339 time, or 30s, 10m, 2h, 1d back from now.
patternstringFor logs: only the lines that match this text (or expression with regex).
case_sensitivebooleanFor pattern: upper and lower case differ (default false).
whole_wordbooleanFor pattern: only whole words (default false).
regexbooleanFor pattern: it is a regular expression (default false).
dry_runbooleanFor the changing actions: only report what would happen (default true).
enginestringEngine 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.

Terminal window
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"
]
}
}
}