save_text_file
Write text content to a file at a specified path, creating directories as needed. Prevents overwriting existing files unless explicitly allowed.
Instructions
Write text content to a file at a given path. Default: refuses to overwrite existing files (returns a 409-shaped error with the existing file size). Pass overwrite=true to replace. Creates parent directories as needed. Returns {ok, path, bytesWritten}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or working-dir-relative target path. | |
| content | Yes | String content, or an object (will be JSON-stringified). | |
| overwrite | No | If true, replace existing file. Default false. |