Edit source files with string replacement
websiteSourceCode_files_strReplaceAtomically applies ordered exact-string edits to up to 50 files and 200 edits in total as one head version. Each oldStr must match once unless replaceAll is true, and any failing edit aborts the whole call. Set dryRun to validate and count replacements without committing. Takes the edit lease when no leaseToken is sent.
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": {
"websiteId": "<websiteId>",
"files": "<files>"
},
"name": "websiteSourceCode_files_strReplace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Files to edit (up to 50, and 200 edits in total). Every edit across every file commits as one version, or none of them do. | |
| dryRun | No | Validate every edit and report the replacement counts without committing. | |
| websiteId | Yes | ||
| leaseToken | No | Omit to have Cactal take the edit lease for you; pass a token from websiteSourceCode.lease.acquire to take over from another editor. |