Skip to main content
Glama

Edit a draft

drafts_update
Destructive

Change a draft in a connected mailbox. A field the call leaves out stays as the draft has it. A mailbox whose provider is imap keeps the edited draft under a new id the answer names, and the old id then reads nothing; an old version its server did not remove stays in Drafts, named as previousVersionId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ccNoWho to copy.
idYesThe id a draft tool answered, or the draftId a search or a read answered.
toNoWho the message is addressed to.
bccNoWho to blind-copy. The other recipients are not told.
bodyNoThe whole message text, a reply's quote included. Given without html, the draft becomes plain text.
htmlNoThe whole message as HTML, for formatting; given without body, its plain-text version is read from it. An Outlook mailbox keeps only the HTML and writes the plain version from it.
mailboxYesThe mailbox's name or its email address.
subjectNoThe subject line.
attachmentsNoFiles to carry, each held by a connected mailbox of the draft's own provider or written out. Named, they replace the ones it holds, and an empty list removes them all. An Outlook draft takes on the new files before it gives up the old, so a replacement stopped midway is reported and may leave both. An Outlook draft sent while it is rewritten may lose its old files from the sent copy.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
linkNo
threadIdNo
previousVersionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / previousVersionId
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "id",
      -  "link"
      -]New value: +[
      +  "id"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed3 schema fields changed
    • changedInput schema / properties / bcc / items / pattern
      Previous value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"New value: +"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    • changedInput schema / properties / cc / items / pattern
      Previous value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"New value: +"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    • changedInput schema / properties / to / items / pattern
      Previous value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"New value: +"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is known. The description adds genuinely new behavior: omitted fields are preserved, and on IMAP the edit yields a NEW id, the old id stops resolving, and any surviving old version appears as previousVersionId. That is exactly the kind of non-obvious side effect the agent cannot infer from annotations.

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?

Three sentences, front-loaded with the core action, then patch semantics, then the provider-specific id caveat. Every sentence carries information, though the phrasing ('the answer names', 'reads nothing') is slightly oblique and costs a beat of parsing.

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?

With an output schema present, return values need not be explained, and the description still adds the id/previousVersionId outcome the agent must anticipate. For a 9-parameter destructive edit tool this is close to complete; only explicit alternative-tool routing 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 per-parameter meaning is already handled and baseline would be 3. The description adds cross-parameter semantics the schema does not express — that any omitted field is left at its current value — which materially changes how an agent should call this with 9 optional-ish fields.

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 and resource ('Change a draft in a connected mailbox') plus the mutation model, which is enough to identify the operation. It never names or contrasts with siblings like drafts_create or drafts_send, so differentiation is left to the name rather than the prose.

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?

The patch semantics ('A field the call leaves out stays as the draft has it') implicitly tell the agent this is for partial edits rather than full rewrites, which is useful. There is no explicit when-to-use/when-not guidance and no routing to alternatives such as drafts_create or drafts_send.

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