Multi-file find/replace in one call
apply_editsApply literal find/replace edits to several files in one call, in the served files (target 'dist', live at once) or the editable source (target 'source', shipped by build_and_deploy). Same edit rules as update_file_content. All or nothing: if any edit's match count differs from its expected count, no file is written.
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": {
"name": "<name>",
"files": "<files>"
},
"name": "apply_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Site name as shown by list_sites, e.g. my-portfolio. | |
| files | Yes | Files + edits to apply. Up to 25 files / 200 total edits per call. All-or-nothing: if any edit's match count differs from its expected count, NOTHING is written. | |
| target | No | Tree to edit, dist (default) or source. Same tree applies to every file in this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| files | Yes | ||
| siteId | Yes | ||
| target | Yes | ||
| warnings | No | Secret-scanner findings in the rewritten files that did not block the call. Malicious content blocks the whole call with MALICIOUS_CONTENT instead. | |
| totalEdits | Yes |