manage_email
Search, read, send, and manage emails in Google Workspace: find messages with Gmail search syntax, retrieve full content, reply, forward, archive, label, and handle attachments.
Instructions
Search, read, send, forward, or manage emails in a Google Workspace account. Supports Gmail search syntax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC email(s), comma-separated. On `replyAll` these are ADDITIONAL — they do not replace the recipients already on the thread. | |
| to | No | Recipient email(s), comma-separated | |
| bcc | No | BCC email(s), comma-separated | |
| body | No | Email body text. On `forward`, an optional note prepended ABOVE the forwarded message. | |
| from | No | Sender email or RFC 2822 mailbox for a verified Gmail Send As alias | |
| html | No | Treat body as HTML content (default: plain text) | |
| draft | No | Save as draft instead of sending (default: false, forced true when attachments present) | |
| Yes | Account email address | ||
| query | No | Gmail search query (e.g. "from:alice subject:meeting has:attachment") | |
| subject | No | Email subject line | |
| filename | No | Attachment filename, exactly as it appears in the `read` response (e.g. 'invoice_template.md') | |
| threadId | No | Thread ID to retrieve | |
| messageId | No | Email message ID | |
| operation | Yes | search: find emails by query | read: get full email by ID. Pass bodyFormat: 'html' when the plain-text part is a stub (marketing email, invitations, booking confirmations) and the dates/codes you need only exist in the HTML — returned HTML is sanitized and wrapped in a Spotlighting block (ADR-305). | archive: save an email's headers and body to a markdown file in the workspace — a LOCAL archive, not Gmail's 'remove from inbox' (attachments are listed, not downloaded) | send: compose and send a new email (creates draft when attachments present, 35MB attachment limit via upload endpoint) | reply: reply to a message (thread-aware, creates draft when attachments present) | replyAll: reply-all to a message (thread-aware, includes all recipients, creates draft when attachments present) | forward: forward a message to new recipients (includes original attachments by default) | triage: unread inbox summary (sender, subject, date) | trash: move a message to trash | untrash: restore a message from trash | getAttachment: download an email attachment to workspace directory (use read first to see attachment list) | viewAttachment: view an image attachment inline without saving to workspace (png, jpg, gif, webp). Use for quick preview — use getAttachment to save. | modify: add or remove labels on a message (e.g. archive, mark read/unread) | labels: list all labels in the mailbox | threads: list email threads by query | getThread: get all messages in a thread | |
| bodyFormat | No | How to render the message body. 'plain' (default) returns text/plain or a crude HTML-strip fallback. 'html' returns the text/html part sanitized — useful when the plain-text part is empty/stub. | |
| maxResults | No | Max results (default: 10, max: 50) | |
| outputPath | No | Local path to save the markdown file (workspace-relative; defaults to a slug from the message date and subject) | |
| addLabelIds | No | Comma-separated label IDs to add (e.g. STARRED, IMPORTANT, Label_123) | |
| attachments | No | Workspace filenames to attach, comma-separated (files must exist in workspace via manage_workspace). Creates draft when present. | |
| removeLabelIds | No | Comma-separated label IDs to remove (e.g. UNREAD, INBOX to archive) |