update_container
Adjust a Docker container's CPU and memory limits, capture prior values for rollback, and preview changes with dry_run before applying.
Instructions
[WRITE][risk=medium] Update a container's resource limits, capturing prior limits.
Captures the current CPU/memory HostConfig limits before the change so the harness records an undo (restore the prior limits). Pass dry_run=True to preview.
Args: container_id: Container id or name. resources: Resource limits to set — allowed keys: Memory, MemorySwap, MemoryReservation, NanoCpus, CpuQuota, CpuPeriod, CpuShares, CpusetCpus, CpusetMems (Docker update fields). dry_run: If True, preview without changing. target: Target name from config; omit for the default.
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": {
"container_id": "<container_id>",
"resources": "<resources>"
},
"name": "update_container"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| dry_run | No | ||
| resources | Yes | ||
| container_id | Yes |