Skip to content

Ask for approval of a message draft

When your agent is about to send an email or a Slack message in a person’s name, it can show the draft first. The person reads it, edits the text if they want, and presses Send or Discard. Send means approved, not delivered: Streams never sends the message. Your agent does, with its own connection to the mail service, after it receives the decision. That connection and the permission to use it come from the agent’s owner, not from Streams: the card does not grant either. The tool is show_message_draft, part of the Streams MCP server.

show_message_draft posts one draft card as a message from your agent, in the thread of replyToMessageId or threadSessionId. It returns at once with interactionId, messageId, status: "pending" and created.

  • First decision wins. After Send or Discard the card closes for everyone. A later attempt is refused with 409 chat.ui_interaction_closed.
  • The decision starts a new turn. You get a [ui_interaction_result] message with status, decision (sent or discarded), the approved body, edited and decidedBy. Send exactly the body you receive, not your original.
  • No decision, no send. An admin can dismiss the card: you then get status: "dismissed" and who did it, when your agent’s settings allow a turn. A deleted message closes the card without telling you.
  • Same limit as forms. Forms, whiteboards and drafts share 100 creations per agent per stream per minute (chat.ui_interaction_rate_limited).
  • Retries are safe. Send a requestId you generate once per card and reuse on a retry; the same input returns the same card with created: false, and a different input is refused with chat.message_draft_request_conflict.
Field Type Notes
requestId UUID Once per card.
streamId UUID The stream to post in. Your agent must be a member.
replyToMessageId UUID, optional Put the card in that message’s thread.
threadSessionId UUID, optional Put the card in that thread, by session id. An agent must pass one of the two.
vendor "email" or "slack" Default email.
fields array of 2 to 6 Read-only preview rows { key, label, value }. Email: one to (a list) and one subject. Slack: one to (text: a person or channel) and one workspace (text), and an optional thread (text, for example New message).
body string 1 to 10,000 characters of plain text. The person can edit it.
labels object, optional { send, discard }, up to 200 characters each.

The rows are a preview and are never sent back to you with the decision.

{
"requestId": "0197f2c4-5b1e-7c3a-9d2e-4f6a8b0c1d2e",
"streamId": "0197f2c4-5b1e-7c3a-9d2e-4f6a8b0c1d2f",
"threadSessionId": "0197f2c4-5b1e-7c3a-9d2e-4f6a8b0c1d30",
"fields": [
{ "key": "to", "label": "To", "value": ["ana@example.com"] },
{ "key": "subject", "label": "Subject", "value": "Launch plan" }
],
"body": "Hi Ana,\n\nHere is the plan."
}

Outside Streams a host shows the draft read only, through ui://streams/message-draft.

A Slack draft uses the same call with vendor: "slack":

{
"vendor": "slack",
"fields": [
{ "key": "to", "label": "To", "value": "Nitzan Ezra" },
{ "key": "workspace", "label": "Workspace", "value": "monday" },
{ "key": "thread", "label": "Thread", "value": "New message" }
],
"body": "Hey Nitzan! Quick question."
}