Skip to main content
Glama

Create an email draft

create_draft

Creates a NEW email and saves it in the Drafts folder of the chosen mailbox, with the recipients, subject and body given. NOTHING IS SENT: the draft appears in the user's mail app, where they review and send it. attachments can join files: an attachment of another email, or a file you write (text or base64). Replies and forwards with recipients, subject, quote and thread filled in are created by reply_draft and forward_draft.

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": {
      "accountId": "<accountId>",
      "to": "<to>",
      "subject": "<subject>",
      "body": "<body>"
    },
    "name": "create_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoCC recipients.
toYesRecipients (email addresses).
bodyYesMessage body, plain text.
fromNoSender address: the mailbox address or one of its verified send-as aliases (Gmail). Default: for a reply (inReplyTo), the alias the original message was addressed to, unless that address is a recipient; otherwise the mailbox address.
subjectYesSubject.
accountIdYesMailbox the message is written from.
inReplyToNomessageId of the message being replied to (from get_message), to keep the thread.
referencesNoreferences of the original message (from get_message), to keep the thread.
attachmentsNoFiles to attach (10 max, 20 MB in total; files written inline, as text or base64, 5 MB each and 7 MB together): an attachment of another email ({ fromMessage: { accountId, uid, folder, index } }), a text file written by you ({ filename, text }), or a binary file ({ filename, base64 }).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / attachments / description
      Previous value: -"Files to attach (10 max, 20 MB in total): an attachment of another email ({ fromMessage: { accountId, uid, folder, index } }), a text file written by you ({ filename, text }), or a binary file ({ filename, base64 })."New value: +"Files to attach (10 max, 20 MB in total; files written inline, as text or base64, 5 MB each and 7 MB together): an attachment of another email ({ fromMessage: { accountId, uid, folder, index } }), a text file written by you ({ filename, text }), or a binary file ({ filename, base64 })."
    • changedInput schema / properties / attachments / items / anyOf
      Previous value: -[
      -  {
      -    "description": "An attachment of another email, in any of the user's mailboxes.",
      -    "properties": {
      -      "filename": {
      -        "description": "Optional new file name.",
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "fromMessage": {
      -        "properties": {
      -          "accountId": {
      -            "description": "Account id, as returned by list_accounts.",
      -            "format": "uuid",
      -            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -            "type": "string"
      -          },
      -          "folder": {
      -            "default": "INBOX",
      -            "description": "IMAP folder containing the message. Defaults to INBOX.",
      -            "maxLength": 200,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "index": {
      -            "default": 0,
      -            "description": "Position in get_message's attachments list, starting at 0.",
      -            "maximum": 99,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "uid": {
      -            "description": "IMAP UID of the message, as returned by search and listing tools.",
      -            "exclusiveMinimum": 0,
      -            "maximum": 9007199254740991,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "accountId",
      -          "uid"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "fromMessage"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "A text file written by the assistant.",
      -    "properties": {
      -      "filename": {
      -        "description": "File name with its extension, e.g. \"quote.pdf\" or \"contacts.csv\".",
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "text": {
      -        "description": "File content as text (CSV, TXT, Markdown, JSON, ICS...).",
      -        "maxLength": 1000000,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "filename",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "A binary file, base64-encoded (5 MB max).",
      -    "properties": {
      -      "base64": {
      -        "description": "File content, base64-encoded.",
      -        "maxLength": 7000000,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "filename": {
      -        "description": "File name with its extension, e.g. \"quote.pdf\" or \"contacts.csv\".",
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "filename",
      -      "base64"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "An attachment of another email, in any of the user's mailboxes.",
      +    "properties": {
      +      "filename": {
      +        "description": "Optional new file name.",
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "fromMessage": {
      +        "properties": {
      +          "accountId": {
      +            "description": "Account id, as returned by list_accounts.",
      +            "format": "uuid",
      +            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +            "type": "string"
      +          },
      +          "folder": {
      +            "default": "INBOX",
      +            "description": "IMAP folder containing the message. Defaults to INBOX.",
      +            "maxLength": 200,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "index": {
      +            "default": 0,
      +            "description": "Position in get_message's attachments list, starting at 0.",
      +            "maximum": 99,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "uid": {
      +            "description": "IMAP UID of the message, as returned by search and listing tools.",
      +            "exclusiveMinimum": 0,
      +            "maximum": 9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "accountId",
      +          "uid"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "fromMessage"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "A text file written by the assistant.",
      +    "properties": {
      +      "filename": {
      +        "description": "File name with its extension, e.g. \"quote.pdf\" or \"contacts.csv\".",
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "text": {
      +        "description": "File content as text (CSV, TXT, Markdown, JSON, ICS...).",
      +        "maxLength": 1000000,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filename",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "A binary file, base64-encoded (5 MB max, 7 MB with the other inline files).",
      +    "properties": {
      +      "base64": {
      +        "description": "File content, base64-encoded.",
      +        "maxLength": 7000000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "File name with its extension, e.g. \"quote.pdf\" or \"contacts.csv\".",
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filename",
      +      "base64"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed1 schema field changed
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "Sender address: the mailbox address or one of its verified send-as aliases (Gmail). Default: for a reply (inReplyTo), the alias the original message was addressed to, unless that address is a recipient; otherwise the mailbox address.",
      +  "format": "email",
      +  "maxLength": 320,
      +  "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, but the description adds the crucial behavior those do not convey: the message is only saved to Drafts, never sent, and a human reviews and sends it. It also discloses attachment sourcing (another email's attachment, inline text, or base64) and implies size/quantity limits. It stops short of saying what permission or mailbox constraints apply, or what identifier comes back.

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?

Three sentences, front-loaded with the core action and the no-send guarantee, then attachments, then sibling routing. Nothing is padding and the most surprising fact (nothing is sent) comes early.

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 9-parameter mutation tool with full schema coverage and no output schema, the description covers the behavior an agent needs: no sending, folder placement, and attachment forms. The one gap is that it doesn't say what the call returns (e.g., a draft id) for subsequent update_draft or delete_draft calls.

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; the description earns a bump by summarizing the three attachment shapes (fromMessage, text, base64) in plain language, making the deeply nested attachments union faster to reason about. For the other fields it largely restates the schema.

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?

The description states a specific verb and resource ("Creates a NEW email and saves it in the Drafts folder") and pins down the scope: which mailbox, what fields. The final sentence distinguishes it from reply_draft and forward_draft by naming the exact cases those cover, so an agent can route without opening sibling schemas.

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

Usage Guidelines5/5

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

It gives explicit when-to-use (compose a fresh message with recipients/subject/body) and explicit when-not (replies and forwards belong to reply_draft and forward_draft, with thread fields pre-filled there). The "NOTHING IS SENT" clause also rules out treating this as a send tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources