docker_apply_patch
Apply unified diffs to files inside a Docker container. Supports dry-run and strip level, trying multiple patch methods for compatibility.
Instructions
Apply a unified diff inside a Docker container. Tries apply_patch (strip=0 only), then git apply, then patch. Supports dry-run and strip level.
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": "<container>",
"patch": "<patch>"
},
"name": "docker_apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | Unified diff to apply. | |
| strip | No | Number of leading path components to strip (-p<N>). | |
| dry_run | No | Simulate the patch application without changing files. | |
| container | Yes | Docker container name or id. |