ドキュメント本文へスキップ
MCPサーバー

下書き

メールボックスに保存された未送信のメッセージ。

下書きのツール

ツール機能
listDrafts下書きを最近保存した順に返し、それぞれに件名、受信者、送信者が付く。query で検索できる。
getDraft1 つの下書きの全体: 送信者、受信者、件名、返信先のスレッド、添付ファイル、本文。
createDraft新しい下書きを送信せずに保存する。どのフィールドも省略でき、threadId を渡すと返信になる。
updateDraft下書きのフィールドを変更する。省略したフィールドは値がそのまま残り、リストは保存済みのものを丸ごと置き換える。
deleteDraft下書きを完全に削除する。ゴミ箱には入らない。

読み取りには「下書きを読み取る」(drafts:read)、保存、変更、削除には「下書きを作成・編集する」(drafts:write)が必要である。一部のアドレスに限定されたクライアントに見えるのはそれらのアドレスの下書きだけで、保存する下書きには、そのクライアントが送信元にできる from が必要になる。

アプリのチャットでは、下書きの保存、変更、削除は、依頼された場合を除いて事前に確認する。

リファレンス

listDrafts

スコープdrafts:readアプリのアシスタントは確認せずに実行しますツールキットdrafts

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.

入力

querystring
limitinteger
1以上100以下
pageTokenstring

ほかの提供先

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

getDraft

スコープdrafts:readアプリのアシスタントは確認せずに実行しますツールキットdrafts

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.

入力

draftIdstring必須
空でないこと

ほかの提供先

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

createDraft

スコープdrafts:writeご自身で依頼した場合を除き、アプリのアシスタントは先に確認しますツールキットdrafts

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.

入力

tostring[]
ccstring[]
bccstring[]
subjectstring
998文字まで
htmlstring
1000000文字まで
textstring
1000000文字まで
fromstring
threadIdstring

ほかの提供先

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

updateDraft

スコープdrafts:writeご自身で依頼した場合を除き、アプリのアシスタントは先に確認しますツールキットdrafts

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.

入力

draftIdstring必須
空でないこと
tostring[]
ccstring[]
bccstring[]
subjectstring
998文字まで
htmlstring
1000000文字まで
textstring
1000000文字まで
fromstring
null も可
threadIdstring

ほかの提供先

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

deleteDraft

スコープdrafts:writeご自身で依頼した場合を除き、アプリのアシスタントは先に確認しますツールキットdrafts

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

入力

draftIdstring必須
空でないこと

ほかの提供先

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