network_disconnect
Disconnect a container from a Docker network while keeping it running, or force-remove a stale endpoint to enable network deletion.
Instructions
Disconnect a container from a network.
The container keeps running with its other network attachments; only this endpoint is removed
(the reverse of network_connect). A network with connected containers cannot be deleted, so
disconnect them before network_remove.
Args: container: The container id or name to disconnect force: Force the disconnect; use to clear a stale endpoint (e.g. from a deleted container)
Returns: bool: True after the container is disconnected
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>",
"container": "<container>"
},
"name": "network_disconnect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| container | Yes | ||
| id_or_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |