Write File
file_writeWrite, append, or create files with text or base64 content, enforcing allowed paths and creating parent directories automatically.
Instructions
Write, append to, or create a text/base64-encoded file. Destructive — requires confirm: true when MACCTL_CONFIRM_DESTRUCTIVE is enabled (the default), for every mode (this framework gates confirmation per-tool rather than per-call, so 'create'/'append' are covered by the same gate as an overwrite). Path is checked against MACCTL_ALLOWED_PATHS/MACCTL_DENIED_PATHS. Parent directories are created as needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'write' overwrites (or creates), 'append' adds to the end (creates if missing), 'create' fails if the file already exists. Defaults to 'write'. | |
| path | Yes | ||
| confirm | No | Must be true to execute this destructive action. | |
| content | Yes | Text content, or base64 if encoding is 'base64'. | |
| encoding | No | Defaults to utf8. |