/gmail | Type: Application | PCID required: Yes
Email send, read, search, and label management
Tools
| Tool | Description |
|---|---|
gmail_send_email | Send an email via Gmail. Supports CC/BCC, HTML content, attachments via URL, and email threading for replies |
gmail_draft_email | Create a draft email in Gmail for user review before sending. Same options as gmail_send_email |
gmail_read_email | Read the full content of an email including body, headers, and attachment info. Use messageId from gmail_search_emails |
gmail_search_emails | Search emails using Gmail search syntax. Returns structured email data including id, subject, from, to, cc, date, snippet, labelIds, and optionally attachments and body content. Supports bodyPreview when includeBody is “preview”, “text”, “html”, or “both”. |
gmail_modify_email | Add or remove labels on an email. Use to mark read/unread, star, move to folders, or apply custom labels |
gmail_list_email_labels | List all Gmail labels (both system and custom). Returns label IDs needed for gmail_modify_email |
gmail_create_label | Create a new custom Gmail label for organizing emails. Returns the label ID for use with gmail_modify_email |
gmail_update_label | Rename a label or change its visibility settings |
gmail_delete_label | Delete a custom label. Emails with this label are NOT deleted, only the label is removed from them |
gmail_get_or_create_label | Get a label by name, creating it if it does not exist. Idempotent - safe to call multiple times |
gmail_batch_modify_emails | Apply label changes to multiple emails at once. More efficient than calling gmail_modify_email repeatedly |
gmail_batch_delete_emails | Delete multiple Gmail messages by moving them to the trash using batch processing. Messages can be recovered from trash within 30 days. |
gmail_archive_email | Archive an email (removes from inbox but keeps it accessible in All Mail). Email is NOT deleted |
gmail_trash_email | Move email to Trash. Can be recovered within 30 days. |
gmail_download_attachment | Download an email attachment. Returns base64-encoded content. Get attachmentId from gmail_read_email or trigger event |
gmail_list_trigger_capabilities | List available Gmail trigger types for automation. Used by the trigger configuration system |
gmail_poll_trigger | Poll for new emails since last check. Used by automation triggers. Returns full email data including body and attachment info |
gmail_send_email
Send an email via Gmail. Supports CC/BCC, HTML content, attachments via URL, and email threading for replies Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
to | string[] | Yes | — | Recipient email addresses. Example: [“john@example.com”, “jane@example.com”] |
subject | string | Yes | — | Email subject line. For replies, prefix with “Re: ” to maintain thread context |
body | string | Yes | — | Email body content. Plain text by default. Set isHtml=true for HTML content |
isHtml | boolean | No | — | Set to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text) |
cc | string[] | No | — | CC recipients. Example: [“manager@example.com”] |
bcc | string[] | No | — | BCC recipients (hidden from other recipients). Example: [“archive@example.com”] |
replyTo | string | No | — | Where replies should go if different from sender. Example: “support@example.com” |
from | string | No | — | Send as a Gmail alias (must be configured in Gmail settings). Example: “sales@mycompany.com” |
threadId | string | No | — | Thread ID to add this email to an existing conversation. Get from gmail_search_emails or gmail_read_email |
inReplyTo | string | No | — | Message-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers |
attachmentUrls | string[] | No | — | URLs of files to attach. Supports any publicly accessible URL. Example: [“https://example.com/report.pdf”] |
gmail_draft_email
Create a draft email in Gmail for user review before sending. Same options as gmail_send_email Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
to | string[] | Yes | — | Recipient email addresses. Example: [“john@example.com”, “jane@example.com”] |
subject | string | Yes | — | Email subject line. For replies, prefix with “Re: ” to maintain thread context |
body | string | Yes | — | Email body content. Plain text by default. Set isHtml=true for HTML content |
isHtml | boolean | No | — | Set to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text) |
cc | string[] | No | — | CC recipients. Example: [“manager@example.com”] |
bcc | string[] | No | — | BCC recipients (hidden from other recipients). Example: [“archive@example.com”] |
replyTo | string | No | — | Where replies should go if different from sender. Example: “support@example.com” |
from | string | No | — | Send as a Gmail alias (must be configured in Gmail settings). Example: “sales@mycompany.com” |
threadId | string | No | — | Thread ID to add this draft to an existing conversation. Get from gmail_search_emails or gmail_read_email |
inReplyTo | string | No | — | Message-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers |
attachmentUrls | string[] | No | — | URLs of files to attach. Supports any publicly accessible URL. Example: [“https://example.com/report.pdf”] |
gmail_read_email
Read the full content of an email including body, headers, and attachment info. Use messageId from gmail_search_emails Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageId | string | Yes | — | Email message ID to retrieve. Get from gmail_search_emails results or trigger event data |
gmail_search_emails
Search emails using Gmail search syntax. Returns structured email data including id, subject, from, to, cc, date, snippet, labelIds, and optionally attachments and body content. Supports bodyPreview when includeBody is “preview”, “text”, “html”, or “both”. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Gmail search query using Gmail search syntax |
maxResults | number | No | 10 | Maximum number of results to return (default: 10) |
includeBody | string | No | "none" | Which email body format to include: “none” (default, no body content), “preview” (500-char preview using snippet, fast), “text” (full plain text body), “html” (full HTML body), or “both” (both text + HTML). Note: Options other than “none” and “preview” are slower and use more API quota. |
version | string | No | "1" | Tool version (use “1” for this version) |
gmail_modify_email
Add or remove labels on an email. Use to mark read/unread, star, move to folders, or apply custom labels Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageId | string | Yes | — | Email message ID to modify. Get from gmail_search_emails |
labelIds | string[] | No | — | Replace all labels with these. Use addLabelIds/removeLabelIds instead for partial updates |
addLabelIds | string[] | No | — | Labels to add. System labels: INBOX, STARRED, IMPORTANT, UNREAD, SPAM, TRASH. Or use custom label IDs from gmail_list_email_labels |
removeLabelIds | string[] | No | — | Labels to remove. Example: remove “UNREAD” to mark as read, remove “INBOX” to archive |
gmail_list_email_labels
List all Gmail labels (both system and custom). Returns label IDs needed for gmail_modify_email Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
labelIds | string[] | No | — | Filter to specific label IDs. Omit to get all labels |
gmail_create_label
Create a new custom Gmail label for organizing emails. Returns the label ID for use with gmail_modify_email Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Label name. Can include ”/” for nested labels. Example: “Projects/Client-A” |
messageListVisibility | string | No | — | Show label in message list view. “show” = visible, “hide” = hidden. Default: show |
labelListVisibility | string | No | — | Show label in sidebar. “labelShow” = always, “labelShowIfUnread” = only when unread, “labelHide” = never |
gmail_update_label
Rename a label or change its visibility settings Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Label ID to update. Get from gmail_list_email_labels |
name | string | No | — | New name for the label |
messageListVisibility | string | No | — | Show label in message list view |
labelListVisibility | string | No | — | Show label in sidebar |
gmail_delete_label
Delete a custom label. Emails with this label are NOT deleted, only the label is removed from them Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Label ID to delete. Get from gmail_list_email_labels. Cannot delete system labels |
gmail_get_or_create_label
Get a label by name, creating it if it does not exist. Idempotent - safe to call multiple times Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Label name to find or create. Example: “Processed”, “To Review”, “Client/ProjectX” |
gmail_batch_modify_emails
Apply label changes to multiple emails at once. More efficient than calling gmail_modify_email repeatedly Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageIds | string[] | Yes | — | Array of message IDs to modify. Get from gmail_search_emails. Example: [“msg123”, “msg456”] |
addLabelIds | string[] | No | — | Labels to add to ALL messages. Example: [“STARRED”, “Label_123”] |
removeLabelIds | string[] | No | — | Labels to remove from ALL messages. Example: [“UNREAD”, “INBOX”] |
batchSize | number | No | 50 | Messages per batch. Default: 50. Reduce if timeouts occur |
gmail_batch_delete_emails
Delete multiple Gmail messages by moving them to the trash using batch processing. Messages can be recovered from trash within 30 days. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageIds | string[] | Yes | — | Array of message IDs to permanently delete. WARNING: Cannot be undone |
batchSize | number | No | 50 | Messages per batch. Default: 50. Reduce if timeouts occur |
gmail_archive_email
Archive an email (removes from inbox but keeps it accessible in All Mail). Email is NOT deleted Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageId | string | Yes | — | Gmail message ID to archive. Get from gmail_search_emails |
gmail_trash_email
Move email to Trash. Can be recovered within 30 days. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageId | string | Yes | — | Gmail message ID to trash. Get from gmail_search_emails |
gmail_download_attachment
Download an email attachment. Returns base64-encoded content. Get attachmentId from gmail_read_email or trigger event Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messageId | string | Yes | — | Gmail message ID containing the attachment. Get from gmail_search_emails |
attachmentId | string | Yes | — | Attachment ID to download. Found in email payload.parts[].body.attachmentId from gmail_read_email |
filename | string | No | — | Override filename for the attachment. If omitted, uses original filename |
gmail_list_trigger_capabilities
List available Gmail trigger types for automation. Used by the trigger configuration systemgmail_poll_trigger
Poll for new emails since last check. Used by automation triggers. Returns full email data including body and attachment info Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | No | — | Filter emails with Gmail search syntax. Examples: “from:alerts@service.com”, “subject:order”, “is:unread” |
labelIds | string | No | — | Filter to emails with this label ID. Get ID from gmail_list_email_labels |
includeSpamTrash | boolean | No | — | Include spam/trash emails. Default: false |
cursor | string | No | — | Gmail historyId from previous poll. Pass this to get only NEW emails since last poll |
minTimestamp | number | No | — | Unix timestamp (seconds). Ignore emails before this time. Typically set to trigger creation time |
maxResults | number | No | — | Limit number of emails returned. Default: 100 |

