Capability Sources

Create a Gmail draft or threaded reply with optional workspace attachments

Changed on

Creates a plain-text Gmail draft in the calling member own mailbox. Optional attachments are workspace paths, up to 10 files totaling at most 4 MiB, fulfilled outside model context by a supporting OpenWork host on direct execute_capability calls. Code Mode and other MCP hosts cannot fulfill attachments and create no draft. Set threadId for replies and forwards. Always share the returned draftUrl.

post/v1/capabilities/google-workspace/gmail-drafts

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

object required
to, string required

Recipient email address.

cc, string

Optional comma-separated Cc email addresses.

bcc, string

Optional comma-separated Bcc email addresses.

subject, string required

Draft subject line. For replies or forwards, include threadId; subjects starting with Re: or Fwd: are rejected without threadId so the draft stays on the existing conversation.

body, string required

Draft body: plain prose or a safe Markdown subset (headings, bold, italic or italic, code, text, bare URLs, lists (-, *, 1.) with simple indented nesting, > block quotes, pipe tables, and fenced code). Links must use http, https, or mailto. Raw HTML is displayed as text, never executed. Separate paragraphs with blank lines; single line breaks, indentation, and repeated spaces are preserved. Do not hard-wrap prose. Put the closing (e.g. Thanks,) and sender name on separate lines with a real newline, never joined on one line. For threaded drafts, the server appends the quoted conversation automatically; do not include quoted history.

timeZone, string

User's IANA time zone (for example America/New_York). Pass the user's zone to format reply attribution like Gmail Web, including daylight saving time. When omitted, attribution keeps the original message Date header's offset, not the server's time zone.

threadId, string

Gmail thread id to reply on. Required for replies and forwards; get it from the gmail-messages capability. When set, the draft is attached to that thread as a reply — keep the thread's subject (e.g. 'Re: …').

attachments, string[]

Optional workspace file paths, 1 to 10 files totaling at most 4 MiB. File bytes stay outside model context. Requires a direct execute_capability call from a supporting OpenWork host; Code Mode and other MCP hosts are unsupported and create no draft. Do not retry without attachments.

Response

Draft created.

GoogleWorkspaceDraftResponse required
ok, true required
draftId, string required
messageId, string nullable required
draftUrl, string nullable required

Gmail URL for the ready-to-send draft. Always share draftUrl with the user so they can open the draft in Gmail for review and send.

threadUrl, string nullable required

Gmail URL for the conversation thread returned by Gmail for this draft.

to, string required
subject, string required
threadId, string nullable required
quotedHistoryIncluded, boolean required

True when quoted conversation history was included by the server or already present in the request body.

attachments, object[]

Changes

    • info

      added the new optional request property timeZone

    • breaking

      the message response property const value changed from Workspace attachments require a supporting OpenWork host. No draft was created. Do not retry without attachments. to Workspace attachments require a supporting OpenWork host. No draft was created. In the OpenWork desktop app use the openwork_gmail_draft tool instead; otherwise do not retry without attachments. for the status