Skip to main content
Glama

Update a draft

update_draft
Destructive

Edits an existing draft in the Drafts folder. Only the fields provided change; the other fields, the thread headers and the attachments are kept; addAttachments joins more files (same forms as create_draft's attachments). The draft is replaced: the old copy is deleted and the new one gets a NEW uid, returned in the response.

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

Input Schema

NameRequiredDescriptionDefault
ccNoNew CC recipients (an empty list removes them).
toNoNew recipients.
uidYesUID of the draft, as returned by list_drafts.
bodyNoNew full body.
subjectNoNew subject.
accountIdYesAccount id, as returned by list_accounts.
addAttachmentsNoFiles to add to the draft's attachments (same forms as create_draft).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / addAttachments / 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. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well past the annotations (destructiveHint=true, openWorldHint=true) by spelling out the exact destruction model: the old copy is deleted and the replacement receives a NEW uid, which an agent must know to avoid reusing a stale identifier. It also discloses the partial-update contract — unlisted fields, thread headers and attachments survive — which no structured field conveys.

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?

Four short sentences, each carrying a distinct fact: what it does, partial-update semantics, attachment appending, and the UID-replacement consequence. The most surprising fact (new uid) is placed last but is still prominent, and nothing is repeated from the schema.

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 7-parameter mutation tool with no output schema, the description covers the three things an agent most needs: what is preserved, what is destroyed, and what comes back (the new uid). The cross-reference to create_draft handles the complex nested attachment union without duplicating it.

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?

With 100% schema coverage the baseline is 3, and the description earns above that by clarifying the append-vs-replace semantics of addAttachments ('joins more files') and by generalizing partial-update behavior across all optional fields. It adds real meaning, though it does not restate the per-field specifics the schema already documents.

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?

The description opens with a specific verb and resource ('Edits an existing draft') and scopes it to the Drafts folder, which is enough to separate it from create_draft, delete_draft, reply_draft and forward_draft. It stops short of explicitly naming a sibling it is not, so it lands at 4 rather than 5.

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 by 'existing draft' and by the reference to create_draft's attachment forms, but there is no explicit when-to-use/when-not guidance and no routing statement telling an agent to prefer create_draft, reply_draft or forward_draft in the relevant situations. Adequate but leaves the alternative selection to inference.

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