Edit a draft
drafts_updateChange a draft in a connected mailbox. A field the call leaves out stays as the draft has it. On Gmail a new subject moves the draft out of its conversation into one of its own; on Outlook the answer names the conversation the draft is kept in. A mailbox whose provider is imap keeps the edited draft under a new id the answer names, and the old id then reads nothing; an old version its server did not remove stays in Drafts, named as previousVersionId. An address the person did not give is found in their past mail - messages_list_all_mailboxes with from: or to: and the name, at the headers view - and is theirs to confirm before anything is written to it. The person's own last letter to someone - the newest found with to: and their address whose sender is an address mailboxes_list names - shows the manner they write to them in.
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": {
"mailbox": "<mailbox>",
"id": "<id>"
},
"name": "drafts_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Who to copy. | |
| id | Yes | The id a draft tool answered, or the draftId a search or a read answered. | |
| to | No | Who the message is addressed to. | |
| bcc | No | Who to blind-copy. The other recipients are not told. | |
| body | No | Your own words. They replace everything the draft says above the message it quotes, a signature there included; that quote stays as written, its formatting and pictures with it, and a draft quoting in HTML stays HTML. Given without html on a draft quoting nothing, the draft becomes plain text. | |
| html | No | Your own words as HTML, in place of the draft's own above any quote; given without body, their plain-text version is read from them. An Outlook mailbox keeps only the HTML and writes the plain version from it. | |
| mailbox | Yes | The mailbox's name or its email address. | |
| subject | No | The subject line. | |
| chatFiles | No | Files the person attached in this chat, as the chat itself hands them over - never an address you write: a file anywhere else is refused, and goes in attachments instead. Named, they and attachments together replace the files the draft holds: one it holds stays only where attachments names it again. | |
| attachments | No | Files to carry, each held by any connected mailbox, written out or put at an upload address. A file you hold and can send yourself by HTTP PUT, as from a terminal, is named by filename and mimeType alone: the call then writes nothing and answers with an address to put it at, and the same call made again names it by the upload that answer gave it. Any other file is written out, kept small. Named, they replace the ones it holds - never the pictures inside its words - and an empty list removes them all. An Outlook draft takes on the new files before it gives up the old, so a replacement stopped midway is reported and may leave both. An Outlook draft sent while it is rewritten may lose its old files from the sent copy. | |
| crossCompanies | No | true only once the person said yes, in this conversation, to this one letter going from a mailbox of one of their companies to another company's people or carrying files from another company's mail - the refusal names both. Never set it unasked, and ask again for every letter that crosses. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| from | No | The address the draft goes from once sent. | |
| link | No | ||
| uploads | No | ||
| threadId | No | ||
| signature | No | Which signature went under your words, or why none did: gmail, Gmail's own for the address it went from; lumman, the one Lumman keeps for an Outlook mailbox or one whose provider is imap; none_set, that address has none - settings_send_as_patch sets one, a Gmail one only where that address is the one the mailbox signs in with; left_out, the call asked for none; already_in_words, your words already carried it; company_adds, the person has said the mailbox's company adds its own on its server. | |
| unfilledFields | No | The template fields your words hold unfilled, such as {first_name} or [Name], each as written. A send of the draft refuses one held in its words above any message it quotes until drafts_update puts the words each stands for in its place. | |
| previousVersionId | No |