Skip to main content
Glama

Update draft

update_draft
Destructive

Replace an existing draft. Mail.app cannot edit a saved draft, so this creates the replacement and then deletes the original, so the draft gets a NEW Message-ID, returned as draft_id. Identify the draft with draft_id from list_drafts, or with match_subject / match_to / match_account, which must resolve to exactly one draft. Fields you omit are carried over from the existing draft; attachments is the exception, being the complete new set, so omitting it clears them. This REFUSES a draft that is a reply. The replacement is a new outgoing message and cannot carry In-Reply-To, so updating one would silently break its threading; delete it and call save_reply_draft again with the full text instead. By default the saved draft (new or reply) stays open in a Mail window so the user can review, edit and send it there; the user can turn that off in Keeploop. Pass leave_open=false to save quietly or true to force the window. Omit it to follow the user's setting. left_open says what happened. Recipients must be email addresses. Given only a person's name, look the address up first (search_contacts when it is listed, else search_mail); if more than one person or address could be meant, ask the user. Never guess an address. attachments takes files already in the user's mail as {mail_id, attachment_id} (from get_email or find_attachments; Mail downloads one it has not stored yet), and absolute paths of files in the user's home folder (not hidden ones or ~/Library; from web and phone apps only as the user's Attach files from this Mac permission allows). Up to 18 MB in total. The user sees every file's name and size in the confirmation. Requires Keeploop Pro.

Input Schema

NameRequiredDescriptionDefault
toNo
bodyNo
senderNo
subjectNo
draft_idNo
match_toNo
leave_openNo
attachmentsNo
match_accountNo
match_subjectNo

Output Schema

NameRequiredDescriptionDefault
toYes
noteNo
accountYes
subjectYes
draft_idNo
left_openNo
attachmentsNo
saved_to_draftsYes
replaced_draft_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "AttachmentRef": {
      +    "description": "An attachment already in the user's mail: get_email / find_attachments ids.",
      +    "properties": {
      +      "attachment_id": {
      +        "title": "Attachment Id",
      +        "type": "string"
      +      },
      +      "mail_id": {
      +        "title": "Mail Id",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "mail_id",
      +      "attachment_id"
      +    ],
      +    "title": "AttachmentRef",
      +    "type": "object"
      +  }
      +}
    • changedInput schema / properties / attachments / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "$ref": "#/$defs/AttachmentRef"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructive/non-idempotent, but the description adds substantial context beyond them: the delete-then-recreate semantics and Message-ID change, thread-breaking on replies, leave_open tri-state defaults and the left_open return, 18 MB attachment cap, Pro requirement, and recipient validation rules. This fully discloses the mutation behavior an agent must anticipate.

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?

Long, but front-loaded with the core action and dense with non-redundant detail; the refusal and threading caveat are placed where they matter. Slightly sprawling given 10 params, so not flawless, but almost every clause carries actionable information.

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 10-param destructive mutation with an output schema present (so return values need no explanation), the description still covers identification, field carry-over, attachment semantics, window behavior, and the reply refusal. Nothing an agent needs in order to call it correctly 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 description coverage is 0%, so the description carries the burden and largely succeeds: it explains the identifier params, the attachments format ({mail_id, attachment_id} vs absolute home paths), size limit, and leave_open's three-way semantics. It is vaguer on the plain field params (sender, subject, body) beyond the carry-over rule, so it falls short of full compensation.

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?

States a specific verb and resource ("Replace an existing draft") and immediately explains the non-obvious underlying mechanism (creates replacement, deletes original, new Message-ID). An agent can distinguish it from save_draft, delete_draft, and show_draft without opening a schema.

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

Usage Guidelines5/5

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

Explicitly names how to identify the target (draft_id from list_drafts, or match_subject/match_to/match_account resolving to exactly one), and gives a hard when-not case: it REFUSES reply drafts, with the alternative (delete + save_reply_draft) spelled out. This is a model of routing guidance.

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.