Revise draft
update_draftPatch a draft created by this project using an expected revision, preserving omitted fields and replacing attachments only when supplied. Re-read after a conflict or stale revision before retrying.
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. changes.body_text replaces only your text: the signature and the quote or forward block below it stay (get_draft's composition shows them); changes.signature switches or removes the signature.
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 |