Skip to main content
Glama

Send an email draft

well_send_email_draft
Idempotent

Save the final text of an email draft into the user's own Gmail or Outlook drafts, or hand it to the user's own email app. Well sends nothing itself. The card that well_draft_email shows calls this when the user presses Send.

Do not call it yourself to send on the user's behalf. Draw the card with well_draft_email and let the user press Send.

REQUIRED: to (at least one address), subject and body_lines (the paragraphs), all exactly as the user last saw them. attachment_ids are document_ids of this workspace. Pass the card's draft_id unchanged: it keys the durable write, so a second press of the same card replays the first result and never creates a second draft.

Returns status: "draft_created" (with mailbox_address, drafts_url, and gmail_drafts_url holding the same link) when a draft now waits in the member's mailbox, "draft_queued" when the write is still owed, or "mailto" with a mailto_url — and a fallback_reason when the mailbox path declined. Every status carries mailto_url: on draft_queued the card keeps it as the way out, and a call after the owed write gave up answers mailto with the reason, so the member always keeps a way to send. sent is false on every one of them: the member sends the draft, never Well. The attached documents travel as the download links the body already carries, which do not expire while the document exists. Well sent nothing, so never tell the user the email was sent. A failure carries an error_reason; nothing was sent.

When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.

Input Schema

NameRequiredDescriptionDefault
ccNo
toYes
bccNo
subjectYes
draft_idNoThe `draft_id` the card showed. With it, one Gmail draft is created in the member's connected mailbox; without it (an older card) the draft opens as a `mailto:` link.
body_linesYesThe message's paragraphs, in order.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
attachment_idsNo`document_id`s of this workspace to attach.
transaction_idNoThe `transaction_id` the card showed for a receipt request. The card echoes it unchanged.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

NameRequiredDescriptionDefault
sentNo
errorNo
statusNo
successYes
drafts_urlNo
mailto_urlNo
error_reasonNo
reconnect_urlNo
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
fallback_reasonNo
mailbox_addressNo
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
gmail_drafts_urlNo
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
connected_mailboxesNo
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / error_reason / enum
      Previous value: -[
      -  "no_workspace",
      -  "invalid_draft",
      -  "draft_failed",
      -  "attachment_not_found",
      -  "attachment_link_unavailable",
      -  "attachment_not_pdf",
      -  "invoice_pdf_missing",
      -  "attachment_required",
      -  "invoice_not_issued",
      -  "invoice_canceled",
      -  "task_not_anomaly",
      -  "task_closed"
      -]New value: +[
      +  "no_workspace",
      +  "invalid_draft",
      +  "draft_failed",
      +  "attachment_not_found",
      +  "attachment_link_unavailable",
      +  "attachment_not_pdf",
      +  "invoice_pdf_missing",
      +  "attachment_required",
      +  "invoice_not_issued",
      +  "invoice_canceled",
      +  "order_not_billable",
      +  "task_not_anomaly",
      +  "task_closed"
      +]
  2. Changed10 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,}$"
    • addedOutput schema / properties / drafts_url
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / mailbox_address / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / mailbox_address / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / reconnect_url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / reconnect_url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / resolved_workspace / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolved_workspace / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / error_reason / enum
      Previous value: -[
      -  "no_workspace",
      -  "invalid_draft",
      -  "draft_failed",
      -  "attachment_not_found",
      -  "attachment_link_unavailable",
      -  "attachment_not_pdf",
      -  "invoice_pdf_missing",
      -  "attachment_required",
      -  "invoice_not_issued",
      -  "invoice_canceled"
      -]New value: +[
      +  "no_workspace",
      +  "invalid_draft",
      +  "draft_failed",
      +  "attachment_not_found",
      +  "attachment_link_unavailable",
      +  "attachment_not_pdf",
      +  "invoice_pdf_missing",
      +  "attachment_required",
      +  "invoice_not_issued",
      +  "invoice_canceled",
      +  "task_not_anomaly",
      +  "task_closed"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  5. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  6. Changed8 schema fields changed
    • addedInput schema / properties / draft_id
      Added value: +{
      +  "description": "The `draft_id` the card showed. With it, one Gmail draft is created in the member's connected mailbox; without it (an older card) the draft opens as a `mailto:` link.",
      +  "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"
      +}
    • addedInput schema / properties / transaction_id
      Added value: +{
      +  "description": "The `transaction_id` the card showed for a receipt request. The card echoes it unchanged.",
      +  "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"
      +}
    • addedOutput schema / properties / fallback_reason
      Added value: +{
      +  "enum": [
      +    "scope_missing",
      +    "scope_unverifiable",
      +    "mailbox_ambiguous",
      +    "no_mailbox",
      +    "not_mailbox_owner",
      +    "kill_switch",
      +    "daily_cap_reached",
      +    "draft_failed",
      +    "auth_revoked"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / gmail_drafts_url
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / mailbox_address
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / reconnect_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "mailto"
      -]New value: +[
      +  "mailto",
      +  "draft_created",
      +  "draft_queued"
      +]
  7. Added

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: nothing is ever sent, `sent` is false on every status, `draft_id` makes the durable write replay-safe so a second press never duplicates, attachment links do not expire while the document exists, and a failure carries `error_reason` with nothing sent. This is exactly the behavioral detail an agent needs before invoking a write.

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?

Front-loaded with purpose and the do-not-call-yourself caution; the status enumeration is dense and slightly repetitive (mailto_url is mentioned three times), but for a 12-parameter mutation with fallback semantics most sentences earn their place.

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?

Despite an output schema existing, the description explains the status outcomes, the mailto fallback, and the invariant that nothing is sent — leaving no ambiguity about what a caller will receive or what it must tell the user.

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?

With 67% schema coverage, the description still adds meaning: required fields must match exactly what the user last saw, `attachment_ids` are workspace `document_id`s, `draft_id` must be passed unchanged and keys idempotency, and `workspace_id` is only needed for multi-workspace tokens. That goes well past the schema's own descriptions.

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 concrete verb+resource: saving the final text of an email draft into the user's own Gmail/Outlook drafts or handing it to the email app, and explicitly distinguishes itself from `well_draft_email` (which draws the card). The agent knows exactly which of the two email tools to reach for.

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?

Gives an explicit when-not: 'Do not call it yourself to send on the user's behalf' and names the alternative (`well_draft_email`) plus the trigger (user presses Send). Also covers the multi-workspace case and when `workspace_id` becomes required.

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