Update a draft
update_draftSaves changes to a draft, or to the working copy of a published post, at a given baseRevision. Only the fields in patch change, and each field sent replaces its stored value whole: patch.body is the draft's complete new text. If the draft has been saved since baseRevision, nothing is written and a conflict with the current revision is returned. The live post does not change. Shown to the owner as a draft preview. Requires the drafts:write scope. Publishing, unpublishing and changes to the live profile are made only by the owner, in Entry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entryId": "<entryId>",
"draftId": "<draftId>",
"baseRevision": "<baseRevision>",
"patch": "<patch>"
},
"name": "update_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | The fields to change; omitted fields stay as they are. Each field's limit is in its schema. | |
| draftId | Yes | The draft's id (starts with drf_), as returned by list_drafts or create_draft. | |
| entryId | Yes | The Entry's id (starts with ent_), as returned by list_entries. | |
| baseRevision | Yes | The draft revision the change is made against. If the draft has been saved since, the call fails with a conflict and the current revision. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Only when the call failed (isError): the error code, e.g. conflict, forbidden, not_found, validation_failed, rate_limited. | |
| draft | No | ||
| details | No | Only when the call failed: conflict has revision, forbidden has requiredScope, rate_limited has retryAfter (seconds), validation_failed has problems; a refused page bundle has errors (code, path, detail, fix for each) and a stale page revision has revision. | |
| message | No | Only when the call failed: what went wrong and what to do. | |
| problems | No | Fields that were refused when the others were applied: { field: reason }. |