Skip to main content
Glama

draft_update

Destructive

Replace a draft's recipients, subject, body, and attachments in full, dropping any attachments not passed again. Returns a new draft_id, invalidating the old one.

Instructions

Replace a draft's recipients, subject, body and attachments (full replacement: attachments not passed again are dropped). Returns a new draft_id; the old one stops working. Requires MAIL_DRAFTS_ENABLED=true.

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": {
      "draft_id": "<draft_id>",
      "to": "<to>",
      "subject": "<subject>"
    },
    "name": "draft_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoCC recipients (optional, max 50)
toYesRecipient email addresses (1..50)
bccNoBCC recipients (optional, max 50)
subjectYesEmail subject (1..998 characters)
draft_idYes`draft_id` returned by `draft_create`, `draft_update` or `draft_list`
reply_toNoReply-To address (optional)
body_htmlNoHTML body (at least one of body_text or body_html required). Separate field from `body_text`: pass the HTML itself, never wrapped in pseudo-tags like `<body_html>`; the server rejects them.
body_textNoPlain text body (at least one of body_text or body_html required). Separate field from `body_html`: never concatenate the two or wrap content in pseudo-tags like `<body_text>`; the server rejects them.
account_idNoAccount identifier (defaults to `"default"`)default
referencesNoReferences header for threading (optional)
attachmentsNoFile attachments (optional)
in_reply_toNoIn-Reply-To message ID for threading (optional)

Output Schema

NameRequiredDescriptionDefault
dataYesTool-specific data payload
metaYesExecution metadata (timestamp, duration)
summaryYesHuman-readable summary of the operation outcome

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changedv0.7.1
    • removedInput schema / $defs / AttachmentInput / properties / content_base64 / nullable
      Removed value: -true
    • changedInput schema / $defs / AttachmentInput / properties / content_base64 / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / $defs / AttachmentInput / properties / content_type / nullable
      Removed value: -true
    • changedInput schema / $defs / AttachmentInput / properties / content_type / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / $defs / AttachmentInput / properties / file_path / nullable
      Removed value: -true
    • changedInput schema / $defs / AttachmentInput / properties / file_path / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / $defs / AttachmentInput / properties / filename / nullable
      Removed value: -true
    • changedInput schema / $defs / AttachmentInput / properties / filename / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / description
      Removed value: -"Input: replace the content of an existing draft\n\nFull replacement: the draft is rebuilt from these fields, and attachments\nnot listed again are dropped. The draft gets a new `draft_id`; the old id\nstops working."
    • removedInput schema / properties / body_html / nullable
      Removed value: -true
    • changedInput schema / properties / body_html / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / body_text / nullable
      Removed value: -true
    • changedInput schema / properties / body_text / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / in_reply_to / nullable
      Removed value: -true
    • changedInput schema / properties / in_reply_to / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / references / nullable
      Removed value: -true
    • changedInput schema / properties / references / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / reply_to / nullable
      Removed value: -true
    • changedInput schema / properties / reply_to / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / title
      Removed value: -"DraftUpdateInput"
    • removedOutput schema / description
      Removed value: -"Standard response envelope for all tools\n\nWraps tool-specific data with human-readable summary and execution metadata.\nThis structure provides consistent response shape across all MCP tools."
    • removedOutput schema / title
      Removed value: -"ToolEnvelope"
  2. Changed2 schema fields changedv0.6.0
    • changedInput schema / properties / body_html / description
      Previous value: -"HTML body (at least one of body_text or body_html required)"New value: +"HTML body (at least one of body_text or body_html required).\nSeparate field from `body_text`: pass the HTML itself, never wrapped\nin pseudo-tags like `<body_html>`; the server rejects them."
    • changedInput schema / properties / body_text / description
      Previous value: -"Plain text body (at least one of body_text or body_html required)"New value: +"Plain text body (at least one of body_text or body_html required).\nSeparate field from `body_html`: never concatenate the two or wrap\ncontent in pseudo-tags like `<body_text>`; the server rejects them."
  3. Addedv0.5.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description adds genuinely new operational facts: the update is a full replacement that silently drops omitted attachments, a new draft_id is minted and the old one stops working, and the MAIL_DRAFTS_ENABLED=true gate must be satisfied. These are exactly the side effects an agent needs before invoking a destructive mutation.

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?

One tight sentence cluster: the operation, the destructive replacement caveat, the return-value consequence, and the feature-flag prerequisite, in that priority order. No redundant restatement of the tool name or filler.

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

Completeness5/5

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

For a 12-parameter destructive mutation, the description covers the mutation model, the identity change on return, and the configuration prerequisite, while the output schema and fully-described input schema carry return shape and per-field detail. Nothing needed to call it safely is missing.

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 goes beyond the schema by stating the replacement contract for the attachments parameter — omitting attachments deletes them rather than leaving them untouched. That single clarification materially changes how the parameters must be assembled on every call.

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

Purpose4/5

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

States a specific verb + resource ('Replace a draft's recipients, subject, body and attachments') and qualifies it as a full replacement, which makes it behaviorally distinct from draft_create or draft_delete. It stops short of naming the sibling an agent should use instead when it wants a new draft or a partial edit, so differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Usage is implied: use this when an existing draft's contents must change, and the 'attachments not passed again are dropped' clause tells the agent how to call it correctly for that case. There is no explicit when-not guidance, no mention of draft_create as the alternative for new drafts, and no note that no partial-update path exists.

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