write_text_file
Create UTF-8 text files or replace their full content with conflict-safe overwrites; use a base SHA-256 when updating non-empty files and keep old versions in history.
Instructions
Create a UTF-8 text file, or replace the whole content of one (at most 2 MiB). Overwriting a non-empty file needs base_sha256 from read_text_file; the old content stays in version history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | new file name, with parent_id or parent_path | |
| path | No | absolute file path; created when missing (its folder must exist) | |
| content | Yes | full UTF-8 content, at most 2 MiB | |
| node_id | No | existing text file UUID instead of path | |
| parent_id | No | folder UUID for a new file, with name | |
| base_sha256 | No | sha256 from read_text_file or get_file_info; required to overwrite a non-empty file, fails with EDIT_CONFLICT if it changed since | |
| parent_path | No | folder path for a new file, with name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| kind | Yes | ||
| mime | No | ||
| name | Yes | ||
| path | No | ||
| size | No | ||
| sha256 | No | ||
| created | Yes | ||
| parent_id | No | ||
| updated_at | Yes | ||
| stats_stale | No | ||
| subtree_bytes | No | ||
| subtree_count | No |