patch_script
Apply ordered literal find-and-replace hunks to one script in a single call without resending the file; use dryRun to validate first, with all-or-nothing writes.
Instructions
Apply several literal find-and-replace hunks to one script in a single call, in order, without resending the file. All or nothing: if a required hunk's text is missing, it errors and writes nothing, so a stale patch can't half-apply. Use dryRun to check first. The safest way to edit code you can quote; for a line range use edit_script_lines, and for the same change in many scripts use find_and_replace_in_scripts.
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": {
"path": "<path>",
"hunks": "<hunks>"
},
"name": "patch_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Script to patch. Dot path from the DataModel root, e.g. "Workspace.Map.Door" or "StarterGui.HUD.Frame". A leading "game." is optional; a duplicate sibling name takes the suffix Tufan prints, e.g. "Part (2)". | |
| hunks | Yes | Hunks, applied in order; each sees the result of the previous ones. | |
| place | No | Target place (PlaceId or project name). Defaults to the bound/sole connected place. | |
| dryRun | No | Check that every hunk applies, without writing. Default false. |