Edit a text project file
edit_fileImmediately edit one existing editable text file and record the applied change in PaperDock's Review changes UI. Provide exactly one target (fileId or path) and exactly one payload: operations, content, or rangeToken with insert. Read the relevant current text first and pass its baseRevision. For a long replacement covering every line returned by an exact read_file.lineRange call, pass its rangeToken with insert; the token is connection-, file-, revision-, range-, and content-bound and expires after 10 minutes. For other focused edits, use sequential UTF-16 operations and copy expectedText exactly from read_file without retyping, normalization, spelling correction, or manual Unicode escaping; insertions use expectedText: "". On a conflict, read again and retry once. Use content only when broadly rewriting most of the file. This tool cannot create, rename, or delete files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| fileId | No | ||
| insert | No | ||
| content | No | ||
| projectId | Yes | ||
| operations | No | ||
| rangeToken | No | ||
| baseRevision | Yes | ||
| expectedUpdatedAt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| applicationStatus | Yes |