Skip to main content
Glama

Create draft

create_draft

Creates email drafts in a mailbox’s server Drafts folder for new messages, threaded replies, and forwards, with attachments and signatures, so users can review and send them later.

Instructions

Create a new draft, a threaded reply (reply_to_message_id, quotes the original by default) or a forward (forward_message_id or forward_ref, includes the original's attachments by default) in a mailbox's server Drafts. Attach files by reference to a message you can read (bytes stay on the server) or inline as base64: at most 10 per draft, 10 MiB in total by default. Recipients are only derived for replies with reply_recipients ("sender" or "all"; your own addresses are left out). The sender's default signature goes below body_text and above any quote or forward block; pass signature: "" for another one of this mailbox (list_signatures) or false for none. A signature with HTML makes the draft HTML with a plain-text alternative and inline images. Generate a fresh UUID request_key per intent and reuse it only to retry the same request. The owner reviews and sends it in their mail app unless send rights exist. Change it with update_draft; send it with send_draft when you have send rights, otherwise ask the owner with request_send.

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>",
      "request_key": "<request_key>",
      "body_text": "<body_text>"
    },
    "name": "create_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoCc recipients (email addresses, at most 50).
toNoTo recipients (email addresses, at most 50).
bccNoBcc recipients (email addresses, at most 50).
accountYesMailbox alias or email address from list_accounts.
subjectNoSubject line.
body_textYesPlain-text body (at most 500 KB).
signatureNotrue (default): the sender's default signature, if one is set; false: none; a name from list_signatures: that signature.
attachmentsNoFiles to attach. Either a reference {ref | account + message_id, attachment_id} to an attachment of a message you can read, or inline {filename, mime_type, content_base64}.
forward_refNoForward the message of this ref from search_messages (any mailbox you can read).
request_keyYesClient-generated UUID for idempotent retries.
from_addressNoThe mailbox address or one of its send-as aliases (list_accounts shows from_addresses for IMAP mailboxes; Gmail uses the account's send-as list).
quote_originalNoReplies: quote the original's text below body_text (default true when you have read on this mailbox).
reply_recipientsNoReplies: derive recipients from the original. sender: its Reply-To or From (its To if you sent it); all: also its To and Cc as Cc. Your own addresses are removed; to/cc/bcc are added.
forward_message_idNoForward this message of `account` (needs read).
include_attachmentsNoForwards: attach the original's attachments (default true).
reply_to_message_idNoMake a threaded reply to this message of `account`.

Output Schema

NameRequiredDescriptionDefault
accountNo
draft_idNo
revisionNo
thread_idNo
message_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.20.2
    • addedInput schema / properties / reply_recipients
      Added value: +{
      +  "description": "Replies: derive recipients from the original. sender: its Reply-To or From (its To if you sent it); all: also its To and Cc as Cc. Your own addresses are removed; to/cc/bcc are added.",
      +  "enum": [
      +    "sender",
      +    "all"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / signature / description
      Previous value: -"Append the sender's signature after body_text (default true; nothing happens when none is set)."New value: +"true (default): the sender's default signature, if one is set; false: none; a name from list_signatures: that signature."
    • changedInput schema / properties / signature / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "string"
      +]
  2. Changed12 schema fields changed
    • addedInput schema / properties / attachments / items / properties / account / description
      Added value: +"Reference: mailbox alias of that message (with message_id)."
    • addedInput schema / properties / attachments / items / properties / content_base64 / description
      Added value: +"Inline: the file content, base64 encoded."
    • addedInput schema / properties / attachments / items / properties / filename / description
      Added value: +"Inline: file name."
    • addedInput schema / properties / attachments / items / properties / message_id / description
      Added value: +"Reference: message id (with account)."
    • changedInput schema / properties / attachments / items / properties / mime_type / description
      Previous value: -"type/subtype, e.g. application/pdf"New value: +"Inline: type/subtype, e.g. application/pdf"
    • addedInput schema / properties / attachments / items / properties / ref / description
      Added value: +"Reference: opaque ref from search_messages of the message holding the attachment."
    • addedInput schema / properties / bcc / description
      Added value: +"Bcc recipients (email addresses, at most 50)."
    • addedInput schema / properties / body_text / description
      Added value: +"Plain-text body (at most 500 KB)."
    • addedInput schema / properties / cc / description
      Added value: +"Cc recipients (email addresses, at most 50)."
    • addedInput schema / properties / reply_to_message_id / description
      Added value: +"Make a threaded reply to this message of `account`."
    • addedInput schema / properties / subject / description
      Added value: +"Subject line."
    • addedInput schema / properties / to / description
      Added value: +"To recipients (email addresses, at most 50)."
  3. First observedv0.11.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say this is a non-destructive, non-idempotent write; the description goes well beyond them with attachment caps (10 per draft, 10 MiB total by default), server-side reference vs inline bytes, default signature placement relative to body and quote/forward block, HTML-signature side effects (HTML body with plain text alternative and inline images), and request_key retry semantics. It also explains the human-in-the-loop outcome: the owner reviews and sends unless send rights exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph, but front-loaded with the three modes before limits, signature behavior, idempotency and lifecycle routing. Every sentence adds information an agent needs; nothing is redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter tool with an output schema, this covers modes, defaults, limits, idempotency and next steps thoroughly. Minor gaps remain: from_address is unexplained, and conflicting mode parameters (reply_to_message_id plus forward_message_id) are not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning the schema does not: quote_original defaults to true only with read access, forwards include the original's attachments by default, reply_recipients omits your own addresses and adds to/cc/bcc, and signature accepts a name or false. It does not cover from_address or the interaction between conflicting mode parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource and enumerates the three modes it covers (new draft, threaded reply via reply_to_message_id, forward via forward_message_id/forward_ref) and where it lands (the mailbox's server Drafts). An agent can distinguish it from update_draft, send_draft and request_send without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly routes the lifecycle: change an existing draft with update_draft, send with send_draft when send rights exist, otherwise ask the owner with request_send, and list_signatures for names. It also scopes reply-only parameters ('Recipients are only derived for replies with reply_recipients'). It does not explicitly state when not to use this tool, e.g. editing an existing draft, so it falls short of full when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.