Revise draft
update_draftPatch a draft created by this project only when expected revision matches; keep omitted fields, replace attachments only if provided, and re-read the draft on conflict.
Instructions
Patch a draft this project created, conditional on expected_revision. Omitted fields are kept, including attachments; changes.attachments replaces the whole list ([] removes all). Fails with draft_conflict if the draft changed elsewhere (for example saved in a mail app) or the revision is stale; re-read it with get_draft before trying again. Only drafts created by create_draft can be patched; for any other draft create a new one.
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": {
"account": "<account>",
"draft_id": "<draft_id>",
"expected_revision": "<expected_revision>",
"changes": "<changes>"
},
"name": "update_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Mailbox alias or email address from list_accounts. | |
| changes | Yes | Fields to change; omitted fields keep their value. | |
| draft_id | Yes | Draft id from create_draft or list_drafts. | |
| expected_revision | Yes | Revision from create_draft, get_draft or the last update_draft; a mismatch fails with draft_conflict. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft_id | No | ||
| revision | No |