write_file
Writes or updates file content in active project directories, creating files as needed with support for encodings and base64-encoded binary data.
Instructions
Writes or updates the content of a file within the active project or allowed directories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to update or create. Can be absolute, relative to active directory, or use ~ for home directory. | |
| content | Yes | The content to be written to the file. | |
| encoding | No | Encoding to use when writing the file (e.g., 'utf-8', 'latin1'). Default is 'utf-8'. | |
| filePath | No | Alias for 'path' parameter (deprecated) | |
| createPath | No | If true, creates the directory path if it doesn't exist. | |
| fromBase64 | No | If true, decode the content from base64 before writing. Useful for binary files. | |
| createIfMissing | No | If true, creates the file if it doesn't exist. |