write_file
Write content to a file atomically, creating parent directories as needed. Uses a temporary file and rename to prevent partial writes.
Instructions
Write content to a file atomically.
Creates parent directories by default. Uses atomic write (temp file + rename) by default to prevent partial writes. Supports configurable encoding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | Request model for write_file tool. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path that was written. | |
| size | Yes | Number of bytes written. | |
| encoding | Yes | Encoding used to write the file. |