Docs · static mirror — the interactive version loads with JavaScript.

Gmail

Source: https://runstack.engineer/docs/toolkits/gmail

Read, search, draft, send, and organize emails and threads.

Tools (61):

ToolDescription
gmailListMessagesList or search for Gmail messages. Use query parameter for advanced search (e.g., from:someone@example.com, is:unread).
gmailGetMessageGet details of a specific Gmail message by ID.
gmailSendMessageSend an email via Gmail.
gmailCreateDraftCreate a draft email in Gmail without sending it immediately. Highly recommended for human-in-the-loop review.
gmailListDraftsList drafts in the Gmail mailbox. Optionally filter drafts with a search query.
gmailGetDraftGet details, headers, and content of a specific Gmail draft by draft ID.
gmailSendDraftSend an existing Gmail draft by its draft ID.
gmailDeleteDraftPermanently delete an existing Gmail draft by its draft ID.
gmailListThreadsList or search email conversation threads in Gmail. Filter by search query (e.g., from:someone@example.com, is:unread).
gmailGetThreadGet details and all messages in a specific Gmail conversation thread by thread ID.
gmailReplyToThreadReply to an existing Gmail conversation thread, ensuring the message stays grouped in the same thread.
gmailListLabelsList all labels in the Gmail mailbox (e.g., INBOX, UNREAD, STARRED, IMPORTANT, and user custom labels).
gmailModifyMessageLabelsAdd or remove labels from a Gmail message. Used to mark emails as read/unread, star/unstar, archive (remove INBOX), or assign folders/labels.
gmailTrashMessageMove a Gmail message to the Trash folder (safe recoverable deletion).
gmailUntrashMessageRestore a Gmail message from the Trash folder back to the mailbox.
gmailBatchDeleteMessagesPermanently delete multiple Gmail messages in one request. This bypasses Trash and cannot be undone.
gmailBatchModifyMessagesAdd or remove labels on multiple Gmail messages in one request.
gmailCreateFilterCreate a Gmail filter with criteria and actions such as applying labels, forwarding, archiving, or marking read.
gmailCreateLabelCreate a new user label in Gmail.
gmailDeleteFilterPermanently delete a Gmail filter by ID.
gmailDeleteLabelPermanently delete a user-created Gmail label from the account.
gmailDeleteMessagePermanently delete a Gmail message by ID. This bypasses Trash and cannot be undone.
gmailDeleteThreadPermanently delete a Gmail thread and all of its messages. This cannot be undone.
gmailForwardMessageForward an existing Gmail message to one or more recipients, optionally preserving attachments.
gmailGetAttachmentRetrieve a Gmail message attachment by message ID and attachment ID.
gmailGetAutoForwardingGet Gmail auto-forwarding settings for the authenticated mailbox.
gmailGetContactsFetch Google contacts for the authenticated account using the People API.
gmailGetFilterRetrieve a Gmail filter by ID.
gmailFetchEmailsSearch/list emails with optional hydration: ids_only (fastest), metadata, or full payload. Sort by internalDate client-side; loop page tokens for full coverage.
gmailGetLabelGet label details (name, type, visibility, message/thread counts, color) by label ID.
gmailGetLanguageSettingsGet the Gmail display language (RFC 3066 tag like 'en-GB') for a user.
gmailGetPeopleGet one person by resource name, or list 'Other Contacts' with pagination/sync tokens. Other-contacts mode restricts person_fields.
gmailGetProfileGet mailbox profile (primary email, message/thread totals, historyId). historyId seeds incremental sync via list-history.
gmailGetVacationSettingsGet vacation responder (out-of-office) settings: enabled flag, subject, bodies, schedule, restrictions.
gmailImportMessageImport an RFC 2822 base64url message with delivery scanning/classification (no SMTP, no SPF checks).
gmailInsertMessageInsert an RFC 2822 base64url message directly (IMAP APPEND equivalent), bypassing most scanning. Does not send.
gmailListCseIdentitiesList client-side encryption sending identities with key-pair associations (Workspace CSE only).
gmailListCseKeypairsList client-side encryption key pairs (public certs, enablement state). Paginate with page tokens.
gmailListFiltersList all Gmail filters. Audit for malicious rules or check for duplicates before creating new ones.
gmailListForwardingAddressesList verified forwarding addresses (accepted/pending) usable as auto-forward targets.
gmailListHistoryList mailbox changes since a history ID for incremental sync. Persist the newest historyId as checkpoint; empty history is valid (no changes).
gmailListSendAsList send-as aliases (primary + custom From addresses) with signatures and verification status. Use before composing from an alias.
gmailListSmimeInfoList S/MIME certificate configs for a send-as alias. Needs Workspace Enterprise Plus/Education/Frontline with S/MIME enabled.
gmailModifyThreadLabelsAdd/remove label IDs on a whole thread (all messages). For single messages use modify-message-labels instead.
gmailMoveThreadToTrashMove a thread and all its messages to trash (recoverable via untrash-thread).
gmailPatchLabelPartially update a user label (name, visibility, color with both subfields). System labels are rejected.
gmailPatchSendAsPartially update a send-as alias (display name, signature, reply-to, default flag, SMTP relay).
gmailSearchPeopleSearch saved contacts (+ Other Contacts optionally) by name/email/phone/org. Never auto-pick from ambiguous results; dedupe by email across pages.
gmailSettingsGetImapGet IMAP settings: enabled flag, auto-expunge, expunge behavior, folder size limit.
gmailSettingsGetPopGet POP settings: access window and post-fetch disposition.
gmailSettingsSendAsGetGet one send-as alias config (display name, signature, SMTP relay, verification). 404 if the address is not an alias.
gmailStopWatchStop Gmail push notifications for the mailbox previously configured via watch.
gmailUntrashThreadRestore a trashed thread and its messages.
gmailUpdateDraftReplace a draft entirely by ID (full replace, not patch). Provide complete content; attachments via public URL only.
gmailUpdateImapSettingsUpdate IMAP settings (enabled, autoExpunge, expungeBehavior, maxFolderSize of 0/1000/2000/5000/10000).
gmailUpdateLabelFully update a user label (PUT). Same fields as patch; provide the complete desired state.
gmailUpdateLanguageSettingsSet the Gmail display language. Gmail may save a close variant if the exact tag is unsupported.
gmailUpdatePopSettingsUpdate POP access window (disabled/fromNowOn/allMail) and disposition (leaveInInbox/archive/trash/markRead).
gmailUpdateSendAsFully update a send-as alias. Same fields as patch; non-primary aliases updatable only with domain-wide delegation.
gmailUpdateVacationSettingsConfigure out-of-office auto-replies. Either responseSubject or responseBodyPlainText must be non-empty to activate.
gmailWhoAmIReturn the connected account identity (sub, name, email, hosted domain) via userinfo + Gmail profile.