Edit or manage a project file
project_edit_fileWrite, patch, copy, move, or delete a single project file with preview and recoverable backups. Existing files require a SHA-256 hash.
Instructions
Write, exact-patch, copy, move or delete one file. Preview by default. Existing files require expectedSha256; writes/moves/deletes preserve a recoverable backup. General binary writes are refused; use scf_edit for supported SCF scalar inputs and desktop tools for GDF drawing changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to the project/workspace. Absolute paths must remain inside that scope. | |
| edits | No | Sequential exact text replacements for patch. Each replacement must match exactly occurrences times. | |
| confirm | No | Apply the described file change when true; otherwise return a preview. This is a tool argument, not a request for another user approval. | |
| content | No | Complete new text for write. | |
| project | No | Existing .acf project path or unambiguous project name. File paths are scoped to its directory. | |
| encoding | No | File encoding; latin1 preserves MAX+plus II legacy bytes. Select utf8 explicitly for Unicode files. | |
| operation | No | Single operation to preview/apply. Defaults to write. | |
| workspace | No | Workspace directory for resolving project names, or the scope when no project is supplied. | |
| destination | No | New path inside the scope for copy/move. Existing destinations are refused. | |
| expectedSha256 | No | SHA-256 from project_read_file or another verified read; mandatory for an existing source file. |