apply_code_patch
Apply a Unified Diff patch to a specific file in a Google Apps Script project, preserving all other files and optionally creating a backup before applying.
Instructions
Apply Unified Diff patch to a file while preserving all other files - 99% output reduction
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": {
"script_id": "<script_id>",
"file_name": "<file_name>",
"patch_content": "<patch_content>"
},
"name": "apply_code_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backup | No | Create backup before applying patch (default: true) | |
| file_name | Yes | Target file name to patch | |
| script_id | Yes | Apps Script project ID | |
| patch_content | Yes | Unified Diff patch content |