write
Create or replace a file. Inline content up to 1 MiB; use request_upload for larger. Pass expected_version to fail instead of overwriting concurrent changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File to create or replace, relative to the workspace root. Parent folders are implicit. | |
| content | Yes | Full new content of the file. Replaces the current content entirely. | |
| encoding | No | How content is encoded. Use base64 for binary. | utf8 |
| mime_type | No | Content type, e.g. text/markdown. Guessed from the extension when omitted. | |
| workspace | No | Workspace slug. Optional, defaults to "temp". | |
| override_lock | No | Write even if another agent holds a lock on this path. Recorded in the activity log. | |
| expected_version | No | Fail with VERSION_CONFLICT unless the file is currently at this version. Omit for last-write-wins. |