apply_plan
Apply a DocumentPlan JSON to a document and save as a new version, new document, or replacement. Returns commit details; no changes on failure.
Instructions
Apply a DocumentPlan JSON to (connectionId, documentId) and save through the provider. Returns {committed, outputConnectionId, outputDocumentId, outputVersion, outputName, outputContentType, changes, errors}. saveMode: 'NewVersion' (default, mints a new id under the same connection), 'NewDocument' (mints a fresh id with an optional newName for display), 'Replace' (overwrites the source after an optimistic version check). On any failure nothing is written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newName | Yes | ||
| planJson | Yes | ||
| saveMode | Yes | NewVersion | |
| documentId | Yes | ||
| connectionId | Yes |