file_write
Gate: gated
on file, target the workspace-relative path being written
· write
Write a text file. This is where the file kind actually asks: the target is the path, and the approval offers one widening — the containing directory (notes/todo.md → notes/*). Parent directories are created as needed. See the file kind.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | yes | Workspace-relative path, e.g. notes/todo.md. |
content | string | yes | The text to write. Replaces the file if it exists. |
Output
What was written, and how much:
{ "path": "notes/todo.md", "bytesWritten": 214 }From JavaScript
await nocturn.fs.writeFile("notes/todo.md", "buy milk\n");nocturn.call("file_write", { path: "notes/todo.md", content: "buy milk\n" });Notes
A write replaces the file whole — there is no append tool. Read, change, write back if you need to add to something.