Skip to the documentation
MCP server

Drafts

Unsent messages saved in the mailbox.

Drafts tools

ToolWhat it does
listDraftsThe drafts, most recently saved first, each with its subject, recipients and sender. query searches them.
getDraftOne draft in full: its sender, recipients, subject, the thread it replies to, its attachments and its body.
createDraftSave a new draft without sending it. Every field is optional, and threadId makes it a reply.
updateDraftChange fields on a draft. A field you leave out keeps its value, and a list replaces the saved one whole.
deleteDraftDelete a draft for good. It does not go to the Bin.

Reading needs “Read drafts” (drafts:read) and saving, changing or deleting needs “Create and edit drafts” (drafts:write). A client limited to some addresses sees only the drafts from them, and a draft it saves needs a from it may send as.

In the app’s chat, saving, changing and deleting a draft ask first unless you asked for them.

Reference

listDrafts

Scopesdrafts:readThe app's assistant runs it without askingToolkitdrafts

The unsent drafts in the mailbox, most recently saved first, each with its id, subject, recipients and sender. query searches the subject, the sender and the start of the body. When more follow, the last line gives a pageToken: call again with the same query and that pageToken.

Inputs

querystring
limitinteger
At least 1At most 100
pageTokenstring

Also available in

API
GET /drafts
SDK
drafts.list()drafts.listAll()drafts.iterate()

getDraft

Scopesdrafts:readThe app's assistant runs it without askingToolkitdrafts

One draft in full: its sender, recipients, subject, the thread it replies to, the names of its attachments and its body as saved. Take the id from listDrafts.

Inputs

draftIdstringRequired
Not empty

Also available in

API
GET /drafts/{id}
SDK
drafts.get()

createDraft

Scopesdrafts:writeThe app's assistant asks first unless you asked for itToolkitdrafts

Save a new draft without sending it, as the composer does when you close it. Every field is optional, and html wins over text when both are given. from is the address it will be sent as, and threadId makes it a reply to that thread. sendEmail with the draft id sends it later.

Inputs

tostring[]
ccstring[]
bccstring[]
subjectstring
Up to 998 characters
htmlstring
Up to 1000000 characters
textstring
Up to 1000000 characters
fromstring
threadIdstring

Also available in

API
PATCH /drafts/{id}POST /drafts
SDK
drafts.update()drafts.create()

updateDraft

Scopesdrafts:writeThe app's assistant asks first unless you asked for itToolkitdrafts

Change fields on a saved draft. A field you leave out keeps its value, and a list you give replaces the saved one whole, so to with one address drops the others. from null clears the sender. Take the id from listDrafts.

Inputs

draftIdstringRequired
Not empty
tostring[]
ccstring[]
bccstring[]
subjectstring
Up to 998 characters
htmlstring
Up to 1000000 characters
textstring
Up to 1000000 characters
fromstring
Can be null
threadIdstring

Also available in

API
PATCH /drafts/{id}POST /drafts
SDK
drafts.update()drafts.create()

deleteDraft

Scopesdrafts:writeThe app's assistant asks first unless you asked for itToolkitdrafts

Delete a draft for good. It does not go to the Bin and cannot be brought back. Take the id from listDrafts.

Inputs

draftIdstringRequired
Not empty

Also available in

API
DELETE /drafts/{id}
SDK
drafts.delete()