apply_patch
Apply a unified diff patch to a workspace while enforcing patch limits, ensuring controlled modifications for PR automation.
Instructions
Apply a unified diff patch and enforce patch limits.
The patch is written to a temporary file inside the sandbox and applied
using ``git apply``. Patch limits are enforced before application.
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": {
"workspace_id": "<workspace_id>",
"unified_diff": "<unified_diff>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unified_diff | Yes | ||
| workspace_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||