Write or append to a file
write_fileCreate, overwrite, or append text files in allowed directories; automatically create parent folders and use atomic writes for overwrite mode.
Instructions
Create, overwrite or append to a text file inside an allowed directory. Writes are atomic for overwrite mode. Parent directories can be created automatically. Content is returned as a small JSON summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path or path relative to $HOME. | |
| append | No | Append instead of overwriting. Default false. | |
| content | Yes | File content. | |
| encoding | No | Encoding of content. Default utf8. Use base64 for binary. | |
| create_parents | No | Create missing parent directories. Default true. |