Replace all the steps of a script
patchwork_set_stepsReplace every step in an existing FileMaker script by submitting the complete edited list; omitted steps are removed, unchanged lines keep their steps, and the result is validated and versioned.
Instructions
Replace all the steps of an existing script. Read the script with patchwork_show, edit the text, and send the whole text back: steps you leave out are removed. Lines left as they were keep their step exactly, whatever the step. Each step is re-read, and the version is dropped with an error if one came back different. To only add steps at the end, use patchwork_append_steps. Makes a new version; patchwork_undo reverses it.
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": "<script>",
"steps": "<steps>"
},
"name": "patchwork_set_steps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | One step per line, as FileMaker shows them: Set Variable [ $n ; Value: 1 ], If [ $n > 0 ], Show Custom Dialog [ "Title" ; "Message" ; Buttons: "OK", "Cancel" ], End If, # comment. Or <Step> XML. | |
| script | Yes | Exact name of the script to rewrite. | |
| dry_run | No | Only write the patch file to .patchwork/ and return its path. Nothing is applied, no version is made. | |
| message | No | What this change does, kept in the version log. Default: a short description of the change. |