Skip to content

docker_prune

MCP tools › Containers and Kubernetes

Prune one kind of Docker object: kind containers (stopped, outside Compose projects), images (untagged, unused), networks (not built in, no containers) or volumes (anonymous and unused; named volumes never). Returns the items that would go; dry_run=false (needs the run right, logged) removes exactly those items one by one and reports each failure.

Its results carry text from process: the client is told to treat that as data, never as instructions.

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

Arguments

ArgumentTypeDescription
kindrequiredstringcontainers (stopped, outside Compose projects), images (untagged, unused), networks (not built in, no containers) or volumes (anonymous, unused; named volumes are never pruned).
dry_runbooleanOnly name what would be removed (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_prune '{"kind":"<string>"}'
Input schema as JSON
{
"properties": {
"kind": {
"description": "`containers` (stopped, outside Compose projects), `images` (untagged, unused),\n`networks` (not built in, no containers) or `volumes` (anonymous, unused; named volumes are\nnever pruned).",
"type": "string"
},
"dry_run": {
"description": "Only name what would be removed (default true).",
"type": [
"boolean",
"null"
]
},
"engine": {
"description": "Engine by name or address.",
"type": [
"string",
"null"
]
}
},
"required": [
"kind"
],
"additionalProperties": false,
"type": "object"
}