edit_file
Modify files on a live deployed site using create, replace, or delete, and ship a new patch deploy with preview URL.
Instructions
Patch a file on a live deployed site and ship a new patch deploy. The AI decides what to change; the MCP ships the patch. Returns the new deploy_id + preview_url.
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": {
"deploy_id": "<deploy_id>",
"op": "<op>",
"file": "<file>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | create = new file (requires value/content); replace = first match (requires find + value); replace_all = every match (requires find + value); delete = remove file. | |
| file | Yes | Path of the file to create/replace/delete. | |
| find | No | For replace/replace_all: the exact substring to find inside the file's current content. | |
| value | No | For create/replace/replace_all: the new text. | |
| content | No | Alias for value (kept for ergonomics on create). If both given, value wins. | |
| message | No | Optional human-readable note stored with the patch deploy. | |
| deploy_id | Yes | The BASE deploy to patch on top of. The new patch deploy will have this as its parent_deploy_id. |