Skip to main content
Server path: /gmail | Type: Application | PCID required: Yes Email send, read, search, and label management

Tools

ToolDescription
gmail_send_emailSend an email via Gmail. Supports CC/BCC, HTML content, attachments via URL, and email threading for replies
gmail_draft_emailCreate a draft email in Gmail for user review before sending. Same options as gmail_send_email
gmail_read_emailRead the full content of an email including body, headers, and attachment info. Use messageId from gmail_search_emails
gmail_search_emailsSearch 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_emailAdd or remove labels on an email. Use to mark read/unread, star, move to folders, or apply custom labels
gmail_list_email_labelsList all Gmail labels (both system and custom). Returns label IDs needed for gmail_modify_email
gmail_create_labelCreate a new custom Gmail label for organizing emails. Returns the label ID for use with gmail_modify_email
gmail_update_labelRename a label or change its visibility settings
gmail_delete_labelDelete a custom label. Emails with this label are NOT deleted, only the label is removed from them
gmail_get_or_create_labelGet a label by name, creating it if it does not exist. Idempotent - safe to call multiple times
gmail_batch_modify_emailsApply label changes to multiple emails at once. More efficient than calling gmail_modify_email repeatedly
gmail_batch_delete_emailsDelete multiple Gmail messages by moving them to the trash using batch processing. Messages can be recovered from trash within 30 days.
gmail_archive_emailArchive an email (removes from inbox but keeps it accessible in All Mail). Email is NOT deleted
gmail_trash_emailMove email to Trash. Can be recovered within 30 days.
gmail_download_attachmentDownload an email attachment. Returns base64-encoded content. Get attachmentId from gmail_read_email or trigger event
gmail_list_trigger_capabilitiesList available Gmail trigger types for automation. Used by the trigger configuration system
gmail_poll_triggerPoll 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:
ParameterTypeRequiredDefaultDescription
tostring[]YesRecipient email addresses. Example: [“john@example.com”, “jane@example.com”]
subjectstringYesEmail subject line. For replies, prefix with “Re: ” to maintain thread context
bodystringYesEmail body content. Plain text by default. Set isHtml=true for HTML content
isHtmlbooleanNoSet to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text)
ccstring[]NoCC recipients. Example: [“manager@example.com”]
bccstring[]NoBCC recipients (hidden from other recipients). Example: [“archive@example.com”]
replyTostringNoWhere replies should go if different from sender. Example: “support@example.com
fromstringNoSend as a Gmail alias (must be configured in Gmail settings). Example: “sales@mycompany.com
threadIdstringNoThread ID to add this email to an existing conversation. Get from gmail_search_emails or gmail_read_email
inReplyTostringNoMessage-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers
attachmentUrlsstring[]NoURLs 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:
ParameterTypeRequiredDefaultDescription
tostring[]YesRecipient email addresses. Example: [“john@example.com”, “jane@example.com”]
subjectstringYesEmail subject line. For replies, prefix with “Re: ” to maintain thread context
bodystringYesEmail body content. Plain text by default. Set isHtml=true for HTML content
isHtmlbooleanNoSet to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text)
ccstring[]NoCC recipients. Example: [“manager@example.com”]
bccstring[]NoBCC recipients (hidden from other recipients). Example: [“archive@example.com”]
replyTostringNoWhere replies should go if different from sender. Example: “support@example.com
fromstringNoSend as a Gmail alias (must be configured in Gmail settings). Example: “sales@mycompany.com
threadIdstringNoThread ID to add this draft to an existing conversation. Get from gmail_search_emails or gmail_read_email
inReplyTostringNoMessage-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers
attachmentUrlsstring[]NoURLs 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:
ParameterTypeRequiredDefaultDescription
messageIdstringYesEmail 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:
ParameterTypeRequiredDefaultDescription
querystringYesGmail search query using Gmail search syntax
maxResultsnumberNo10Maximum number of results to return (default: 10)
includeBodystringNo"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.
versionstringNo"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:
ParameterTypeRequiredDefaultDescription
messageIdstringYesEmail message ID to modify. Get from gmail_search_emails
labelIdsstring[]NoReplace all labels with these. Use addLabelIds/removeLabelIds instead for partial updates
addLabelIdsstring[]NoLabels to add. System labels: INBOX, STARRED, IMPORTANT, UNREAD, SPAM, TRASH. Or use custom label IDs from gmail_list_email_labels
removeLabelIdsstring[]NoLabels 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:
ParameterTypeRequiredDefaultDescription
labelIdsstring[]NoFilter 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:
ParameterTypeRequiredDefaultDescription
namestringYesLabel name. Can include ”/” for nested labels. Example: “Projects/Client-A”
messageListVisibilitystringNoShow label in message list view. “show” = visible, “hide” = hidden. Default: show
labelListVisibilitystringNoShow label in sidebar. “labelShow” = always, “labelShowIfUnread” = only when unread, “labelHide” = never

gmail_update_label

Rename a label or change its visibility settings Parameters:
ParameterTypeRequiredDefaultDescription
idstringYesLabel ID to update. Get from gmail_list_email_labels
namestringNoNew name for the label
messageListVisibilitystringNoShow label in message list view
labelListVisibilitystringNoShow 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:
ParameterTypeRequiredDefaultDescription
idstringYesLabel 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:
ParameterTypeRequiredDefaultDescription
namestringYesLabel 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:
ParameterTypeRequiredDefaultDescription
messageIdsstring[]YesArray of message IDs to modify. Get from gmail_search_emails. Example: [“msg123”, “msg456”]
addLabelIdsstring[]NoLabels to add to ALL messages. Example: [“STARRED”, “Label_123”]
removeLabelIdsstring[]NoLabels to remove from ALL messages. Example: [“UNREAD”, “INBOX”]
batchSizenumberNo50Messages 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:
ParameterTypeRequiredDefaultDescription
messageIdsstring[]YesArray of message IDs to permanently delete. WARNING: Cannot be undone
batchSizenumberNo50Messages 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:
ParameterTypeRequiredDefaultDescription
messageIdstringYesGmail message ID to archive. Get from gmail_search_emails

gmail_trash_email

Move email to Trash. Can be recovered within 30 days. Parameters:
ParameterTypeRequiredDefaultDescription
messageIdstringYesGmail 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:
ParameterTypeRequiredDefaultDescription
messageIdstringYesGmail message ID containing the attachment. Get from gmail_search_emails
attachmentIdstringYesAttachment ID to download. Found in email payload.parts[].body.attachmentId from gmail_read_email
filenamestringNoOverride 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 system

gmail_poll_trigger

Poll for new emails since last check. Used by automation triggers. Returns full email data including body and attachment info Parameters:
ParameterTypeRequiredDefaultDescription
querystringNoFilter emails with Gmail search syntax. Examples: “from:alerts@service.com”, “subject:order”, “is:unread”
labelIdsstringNoFilter to emails with this label ID. Get ID from gmail_list_email_labels
includeSpamTrashbooleanNoInclude spam/trash emails. Default: false
cursorstringNoGmail historyId from previous poll. Pass this to get only NEW emails since last poll
minTimestampnumberNoUnix timestamp (seconds). Ignore emails before this time. Typically set to trigger creation time
maxResultsnumberNoLimit number of emails returned. Default: 100