patch_document
Apply a unified diff patch to an existing document to create a new version, avoiding full content resends and payload size limits.
Instructions
Apply a unified diff patch to an existing document, producing a new version.
Use instead of push_document when only part of the document changed — avoids sending the full content and works around tool-call payload size limits.
patch must be in unified diff format (output of difflib.unified_diff). base_version must match the current latest version; if not, returns PATCH_BASE_MISMATCH — call get_document to fetch latest and regenerate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| doc_id | Yes | ||
| base_version | Yes | ||
| patch | Yes |