replace_workflow_document
Replace the entire workflow document atomically to apply comprehensive updates. Use after reading current version to avoid conflicts.
Instructions
Replace the ENTIRE workflow document in one atomic call. Read the workflow first to get the current version, then call this again only after rereading on a stale 409. Unlike apply_workflow_mutations, this is a single PUT and treats the payload as the complete editable document — prefer the mutation commands, which the backend validates and normalises per edit.
The response is the same SUMMARY (version, launchable, validationIssues, stepCount, edgeCount), not the stored document; pass returnDocument: true or call read_workflow for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The workflow's id. | |
| document | Yes | The complete workflow document object to persist. | |
| returnDocument | No | Include the full workflow document in the response. Defaults to false — a real document can exceed the response limit and turn a successful call into an error. Prefer read_workflow when you need it. | |
| expectedVersion | Yes | The version you read before replacing the document. |