Skip to main content
Glama

Send an email

well_send_message

Send one email to one or several people (a supplier, a customer, an accountant) from the user's own Gmail.

Use it when the user asks you to email, write to, or message someone else. To notify the user themselves, use well_send_notification instead.

  • to: a list of the recipients' email addresses, one entry per address. Use the addresses the user gave, or ones read from Well's records; never guess one. Ask the user when you do not have it. One email goes to all of them: do not call this tool once per recipient.

  • cc and bcc: optional lists of addresses in copy and in blind copy. Fill them only when the user asked for a copy.

  • subject and body: write them in the user's language, with what the user asked to say. The body is plain text; line breaks are kept.

  • invoice_id: the id of an issued invoice, only when the user asks you to send that invoice or to chase its customer for it, and you hold its id from Well's records (an invoice you issued or read in this conversation). Well then records the email against the invoice and ends the body with a lasting link to the invoice's PDF, which the card shows: never write a link to the invoice in the body yourself. Leave it out for every other email, and never guess or invent an id. A draft invoice, or an invoice of another workspace, is refused before anything is sent.

  • A sales invoice goes out once, then is chased at most once per lateness band (1 to 30, 31 to 60, 61 to 90, over 90 days late). When the result has code invoice_already_sent, nothing was sent: tell the user when and to whom it already went, as the message says, and do not call this tool again on your own.

  • send_again: set it to true only when the user knows the invoice already went out at this step (you told them, or they said so) and asks to send it again anyway, for example to a corrected address or as a copy the customer asked for. The card then says it sends the invoice again, and the user approves it there. Never set it on your own.

This call sends nothing. It returns an approval link: give it to the user and say the email goes out only after they open the link in Well, read it and approve it there. Never say the email was sent, and never call this tool again for the same email unless the user asks for a changed one: a changed email needs a new link.

When the result has code missing_send_scope or gmail_reconnect_required, Well cannot send from the user's Gmail yet: give the user the reconnect link from the message, and call this tool again with the same values once they say they reconnected. Never send the email another way.

When the result has code outlook_send_unsupported, the user's mailbox is Outlook and Well cannot send from it yet: say so, and offer the two ways the message names. Never say the email 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

TableJSON Schema
NameRequiredDescriptionDefault
ccNoAddresses in copy.
toYesThe recipients' email addresses, one entry per address.
bccNoAddresses in blind copy.
bodyYesThe email body, in plain text. Line breaks are kept.
subjectYesThe email subject line.
invoice_idNoThe id of the issued invoice this email sends. Omit it when the email is not about an invoice.
send_againNoTrue only when the user knows this invoice already went out at this step and asks to send it again anyway.
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.
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.
send_again_overNoSet by Well, never by you: the send a send-again card repeats.
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

TableJSON Schema
NameRequiredDescriptionDefault
codeNomissing_send_scope or gmail_reconnect_required when Gmail needs reconnecting; outlook_send_unsupported when the user's mailbox is Outlook; write_target_unreadable, invoice_not_issued or invoice_canceled when invoice_id cannot be used; invoice_already_sent when the invoice already went out at this step.
linkNoThe link that connects Gmail, when the user's mailbox is Outlook.
errorNoWhy no approval link was created, with the reconnect link when Gmail needs reconnecting.
statusYes
successYes
error_codeYes
expires_atYes
approval_urlYes
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
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.
approval_requiredYes
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
flow_action_offer_idYes
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 / 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."
  2. Changed4 schema fields changed
    • addedInput schema / properties / send_again
      Added value: +{
      +  "description": "True only when the user knows this invoice already went out at this step and asks to send it again anyway.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / send_again_over
      Added value: +{
      +  "description": "Set by Well, never by you: the send a send-again card repeats.",
      +  "format": "date-time",
      +  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      +  "type": "string"
      +}
    • changedOutput schema / properties / code / description
      Previous value: -"missing_send_scope or gmail_reconnect_required when Gmail needs reconnecting; write_target_unreadable, invoice_not_issued or invoice_canceled when invoice_id cannot be used."New value: +"missing_send_scope or gmail_reconnect_required when Gmail needs reconnecting; outlook_send_unsupported when the user's mailbox is Outlook; write_target_unreadable, invoice_not_issued or invoice_canceled when invoice_id cannot be used; invoice_already_sent when the invoice already went out at this step."
    • addedOutput schema / properties / link
      Added value: +{
      +  "description": "The link that connects Gmail, when the user's mailbox is Outlook.",
      +  "type": "string"
      +}
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources