write_file
Create or replace a file; mode append adds to the end. .docx paths take Markdown; .xlsx/.xls/.xlsm take a JSON 2D array or an object of named sheets. The parent folder must exist (mode overwrite creates it). Rewrites are atomic. To change part of an existing file use edit_block; for PDFs use write_pdf.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | rewrite | |
| path | Yes | ||
| content | Yes | ||
| deviceId | No | Computer name or id from list_devices. Optional with one computer online or a default set. | |
| workSessionId | No | Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work. |