container_remove
Delete a container and its writable layer. Force stops running containers first; optionally remove anonymous volumes.
Instructions
Remove a container, deleting its writable layer.
The image is untouched (image_remove deletes images); named volumes are never removed -
volumes=True only covers anonymous ones. A running container is refused unless force=True,
which kills it first. When the server runs containerized it refuses to remove its own
container.
Args:
volumes: Also remove anonymous volumes (the CLI's --volumes); named volumes persist
link: Remove the specified link
force: Kill a running container before removing it (default False: running is an error)
Returns: bool: True after removal completes
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": {
"id_or_name": "<id_or_name>"
},
"name": "container_remove"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| link | No | ||
| force | No | ||
| volumes | No | ||
| id_or_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |