write_document
Create or replace project knowledge documents with automatic backups and conflict detection via expected_uuid, refusing writes that exceed storage limits and relaying warnings.
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; 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 |