Skip to main content
Glama

update_draft

Destructive

Replace an existing email draft's recipients, subject, body, and attachments without sending it, while preserving its draft ID and reply threading.

Instructions

Replace a draft's content without sending it. The draft keeps its ID.

The call's arguments replace the draft's old content: omitted cc, bcc, body_html, and attachments are removed, not kept. A reply draft stays in its thread, keeping its In-Reply-To and References headers, as long as the subject still matches the thread's (Gmail's threading rule). The draft's From (e.g. a send-as alias chosen in Gmail) is also kept.

Args: draft_id: The draft ID (from list_drafts or create_draft). to: Recipient email address, or a list of addresses. subject: Email subject line. body: Plain-text body. cc: Optional CC address or list of addresses. bcc: Optional BCC address or list of addresses. body_html: Optional HTML body (sent alongside the plain-text body). attachments: Optional list of attachment dicts to add. Each needs either local_path or content_base64, plus optional filename and mime_type (guessed from the filename's extension when omitted, else application/octet-stream). keep_attachments: When True, keep every part of the draft except its plain and HTML bodies (so every attachment get_draft lists), ahead of any in attachments. Inline images (parts with a Content-ID) stay inline with the new body_html, so its cid: references still resolve; without body_html they become ordinary attachments.

Returns: Draft id and nested message id/thread_id/label_ids. The message id changes on every update; the draft id doesn't. On failure, {"error": "..."}.

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>",
      "body": "<body>"
    },
    "name": "update_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNo
toYes
bccNo
bodyYes
subjectYes
draft_idYes
body_htmlNo
attachmentsNo
keep_attachmentsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses the important semantics: omitted cc/bcc/body_html/attachments are removed rather than preserved, threading headers survive only if the subject still matches, the From/send-as alias is retained, and the message id changes every update while the draft id does not. These are exactly the non-obvious consequences an agent needs before invoking a content-replacing mutation.

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 behavioral summary is front-loaded and every sentence in it earns its place; the Args block is long but justified by nine parameters with no schema documentation. It is somewhat dense and the keep_attachments entry is a single sprawling sentence, which costs it the top mark.

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 destructive 9-parameter mutation tool, the definition covers replacement semantics, threading side effects, attachment retention rules, return values (draft id, nested message id/thread_id/label_ids) and the error shape. Nothing material is missing for correct invocation, even though an output schema also exists.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden, and it does: every one of the 9 parameters is explained, including the draft_id provenance (list_drafts/create_draft), the string-or-list flexibility of addressing fields, the attachment dict contract (local_path or content_base64, filename, mime_type guessed from extension else application/octet-stream), and the precise replace-vs-keep semantics of keep_attachments with inline Content-ID handling.

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 first sentence gives a specific verb and resource ('Replace a draft's content') plus the key scoping constraint ('without sending it') and the identity guarantee ('keeps its ID'). This lets an agent separate it from send_draft (sends) and create_draft (new draft) 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?

Usage is clearly framed as modifying an existing draft by ID rather than sending or creating one, so the choice against send_draft is inferable from 'without sending it.' It never explicitly names an alternative tool or states an exclusion (e.g. 'use create_draft if no draft exists yet'), so it falls short of a 5.

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

Deploy Server

Other Tools