write_document
Create or replace project documents with local backups, overwrite protection, and teammate conflict detection; refuse writes that exceed project limits.
Instructions
Create a document, or replace one with overwrite=true. The previous content is backed up locally before any replacement. Pass expected_uuid (from read_document) to refuse the write if a teammate has saved since you read it. Refused when the write would grow the project past its search threshold or its maximum, naming the documents most worth compacting and the largest uploaded files, which only the web UI can remove; allow_search_mode=true accepts the threshold, never the maximum. Relay any warning in the result to the user verbatim — it flags a leftover copy or a file name with no extension.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| file_name | Yes | ||
| overwrite | No | ||
| project_id | Yes | ||
| expected_uuid | No | ||
| allow_search_mode | No |