Skip to main content
Glama

Replace a draft

update_draft
DestructiveIdempotent

Replace an email draft's body, recipients, and attachments as a whole, optionally keeping chosen attachments; saves changes without sending. Read it first to preserve parts you want.

Instructions

Replace a draft as a whole: what is left out is gone afterwards, attachments too unless keep_attachments names them. Read it with get_message first to keep parts of it. A draft that answers a message keeps that link with original_id, action and quote=false, as its text holds the quote already. Use the id it answers with from now on: some providers store the draft under a new one. Nothing is sent.

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_id": "<account_id>",
      "draft_id": "<draft_id>"
    },
    "name": "update_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoAddresses, plain or as Name <address>
toNoAddresses, plain or as Name <address>
bccNoAddresses, plain or as Name <address>
htmlNoThe body as HTML, for formatting. Inline styles only (style=...), since many mail programs drop <style> blocks. Without text, the text part is made from it
textNoThe body as plain text
quoteNoWith original_id: false adds nothing of the original, no quote of a reply and no forwarded message. The link to it stays
actionNoWith original_id: reply to its sender, reply_all to everyone it went to, or forward itreply
subjectNoThe subject. Left empty with original_id: the original's, after Re: or Fwd:
draft_idYesA draft of that account, by the id list_drafts or create_draft answers
reply_toNoWhere answers should go instead of this account's address
account_idYesThe account, by the id list_accounts names
forward_asNoA forward: inline quotes the original below the text with its attachments, attachment attaches it unchanged as a fileinline
attach_fromNoAttachments of other mail of this account, attached as they are, before attachments. Needs the right to read that mail
attachmentsNoFiles to attach, 25 MiB together at most
original_idNoA message to answer or forward. Recipients and quote follow
keep_attachmentsNoIds of the stored draft's attachments to keep

Output Schema

NameRequiredDescriptionDefault
idYes
toYes
dateYes
subjectYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.8.0
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / description
      Added value: +"A draft in a list, or the one just written."
    • addedOutput schema / properties
      Added value: +{
      +  "date": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Date"
      +  },
      +  "id": {
      +    "title": "Id",
      +    "type": "string"
      +  },
      +  "subject": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Subject"
      +  },
      +  "to": {
      +    "title": "To",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "id",
      +  "date",
      +  "to",
      +  "subject"
      +]
    • changedOutput schema / title
      Previous value: -"update_draftDictOutput"New value: +"Draft"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare destructive=true, but the description supplies the detail the agent actually needs: omitted fields and attachments are removed unless keep_attachments names them. It also warns that some providers store the draft under a new id, and that the operation sends nothing. The only gap is no mention of failure behavior when the draft_id is invalid or the account lacks rights.

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

Conciseness4/5

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

The destructive consequence is front-loaded in the first clause, followed by the prerequisite, the reply-link rule, the id caveat and the reassurance. Dense but no filler; a couple of sentences pack two ideas and could be split for readability.

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 16-parameter destructive replacement with an output schema and rich annotations, the description covers the three hazards an agent could get wrong: silent loss of omitted fields, loss of attachments, and a changed draft id. Return values are handled by the output schema, so nothing critical 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 adds cross-parameter meaning that the schema does not: quote=false together with original_id and action keeps the reply link while the stored text already holds the quote. That relational guidance genuinely helps the agent set four parameters correctly at once.

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?

"Replace a draft as a whole" names a specific verb and resource and pins down the replacement semantics, which is the key distinction from a partial update. "Nothing is sent" implicitly separates it from send_draft, though no sibling other than get_message is named.

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?

Explicitly tells the agent to read the draft with get_message first if parts should survive, which is the decisive prerequisite for using this tool safely. It gives clear context but does not name alternative tools such as create_draft for starting over.

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