google-gmail

v1.0.4
com.mcparmory/google-gmail Checked 3 days ago Published 6 months ago

Send, read, organize emails, manage labels, drafts, and filters

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_profile Get Profile

Retrieves the Gmail profile information for the authenticated user or a specified user, including account details and settings.

ParameterTypeDescription
userId *stringThe user's email address or the special value `me` to refer to the authenticated user.

list_drafts List Drafts

Retrieves a list of draft messages from the user's mailbox. Supports filtering by search query and optional inclusion of drafts from spam and trash folders.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
includeSpamTrashbooleanWhether to include draft messages from the SPAM and TRASH folders in the results.
maxResultsintegerMaximum number of drafts to return. The default is 100 and the maximum allowed value is 500.
qstringFilter draft messages using Gmail search query syntax. Supports the same query operators as the Gmail search box (e.g., from:, rfc822msgid:, is:unread).

create_draft Create Draft

Creates a new email draft with the DRAFT label in Gmail. The draft can optionally include classification labels and custom label IDs.

ParameterTypeDescription
userId *stringThe user's email address or the special value 'me' to indicate the authenticated user.
classificationLabelValuesarrayClassification label values to apply to the draft message. Each classification label ID must be unique; duplicate IDs will be deduplicated arbitrarily. Only available for Google Workspace accounts.
email_bccstringBlind carbon copy recipients (Bcc header), comma-separated
email_bodystringEmail body content (plain text or HTML)
email_body_is_htmlbooleanWhether email_body is HTML (True) or plain text (False)
email_ccstringCarbon copy recipients (Cc header), comma-separated
email_fromstringSender email address (From header)
email_in_reply_tostringIn-Reply-To header (Message-ID of original message)
email_referencesstringReferences header (Message-IDs of related messages), space-separated
email_reply_tostringReply-To header address
email_subjectstringEmail subject line
email_tostringRecipient email address (To header)
labelIdsarrayList of label IDs to apply to the draft message. Labels are applied in the order provided.

get_draft Get Draft

Retrieves a specific draft message by ID. Returns the draft in the requested format for viewing or further editing.

ParameterTypeDescription
id *stringThe unique identifier of the draft message to retrieve.
userId *stringThe user's email address or the special value 'me' to refer to the authenticated user.
formatstringThe format in which to return the draft message content and metadata.

update_draft Update Draft

Updates the content of an existing draft message. Replaces the draft's message body and metadata with the provided values.

ParameterTypeDescription
id *stringThe unique identifier of the draft message to update.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
classificationLabelValuesarrayClassification label values to apply to the message. Each classification label ID must be unique; duplicate IDs will be deduplicated arbitrarily. Only available for Google Workspace accounts. Classifi…
email_bccstringBlind carbon copy recipients (Bcc header), comma-separated
email_bodystringEmail body content (plain text or HTML)
email_body_is_htmlbooleanWhether email_body is HTML (True) or plain text (False)
email_ccstringCarbon copy recipients (Cc header), comma-separated
email_fromstringSender email address (From header)
email_in_reply_tostringIn-Reply-To header (Message-ID of original message)
email_referencesstringReferences header (Message-IDs of related messages), space-separated
email_reply_tostringReply-To header address
email_subjectstringEmail subject line
email_tostringRecipient email address (To header)
labelIdsarrayList of label IDs to apply to this message. Labels are used to organize and categorize messages in Gmail.

delete_draft Delete Draft

Permanently deletes a draft message without moving it to trash. This action is immediate and irreversible.

ParameterTypeDescription
id *stringThe unique identifier of the draft message to delete.
userId *stringThe email address of the user whose draft should be deleted. Use the special value `me` to refer to the authenticated user.

send_draft Send Draft

Sends an existing draft message to recipients specified in the To, Cc, and Bcc headers. The draft must already exist and contain valid recipient information.

ParameterTypeDescription
userId *stringThe user's email address or the special value `me` to indicate the authenticated user.
classificationLabelValuesarrayClassification label values to apply to the message. Each classification label ID must be unique; duplicate IDs will be deduplicated arbitrarily. Only available for Google Workspace accounts.
email_bccstringBlind carbon copy recipients (Bcc header), comma-separated
email_bodystringEmail body content (plain text or HTML)
email_body_is_htmlbooleanWhether email_body is HTML (True) or plain text (False)
email_ccstringCarbon copy recipients (Cc header), comma-separated
email_fromstringSender email address (From header)
email_in_reply_tostringIn-Reply-To header (Message-ID of original message)
email_referencesstringReferences header (Message-IDs of related messages), space-separated
email_reply_tostringReply-To header address
email_subjectstringEmail subject line
email_tostringRecipient email address (To header)
idstringThe immutable ID of the draft.
labelIdsarrayList of label IDs to apply to this message. Labels are applied in the order provided.

list_mailbox_history List Mailbox History

Retrieves the chronological history of all changes to a mailbox, including message additions, deletions, and label modifications. Results are returned in chronological order by historyId and support pagination for efficient sync operations.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
historyTypesarrayTypes of history events to include in results. When specified, only changes matching these types are returned.
labelIdstringFilter results to only include messages with a specific label ID.
maxResultsintegerMaximum number of history records to return per request. Defaults to 100 if not specified.
startHistoryIdstringStarting point for retrieving history records. Provide a historyId from a previous response or message to retrieve all changes after that point. History IDs are valid for at least a week but may expir…

list_labels List Labels

Retrieves all labels in the user's mailbox. Labels are used to organize and categorize emails in Gmail.

ParameterTypeDescription
userId *stringThe user's email address or the special value `me` to refer to the authenticated user.

create_label Create Label

Creates a new custom label in Gmail for organizing messages and threads. Labels can be configured with specific visibility settings in the Gmail web interface.

ParameterTypeDescription
userId *stringThe user's email address or the special value `me` to indicate the authenticated user.
labelListVisibilitystringControls whether this label appears in the label list in Gmail's web interface.
messageListVisibilitystringControls whether messages with this label are visible in the message list in Gmail's web interface.
namestringThe display name for the label as it appears in Gmail.
typestringThe owner type for the label. User labels are created and managed by the user and can be applied to any message or thread. System labels are internally created and cannot be modified or deleted by use…

get_label Get Label

Retrieves a specific Gmail label by its ID. Use this to fetch detailed information about a label, such as its name, visibility settings, and other metadata.

ParameterTypeDescription
id *stringThe unique identifier of the label to retrieve.
userId *stringThe user's email address or the special value `me` to refer to the authenticated user.

update_label Update Label

Updates an existing Gmail label with new properties such as display name and visibility settings. Only user-created labels can be modified; system labels cannot be changed.

ParameterTypeDescription
id *stringThe unique identifier of the label to update.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
labelListVisibilitystringControls whether the label appears in the label list in Gmail's web interface.
messageListVisibilitystringControls whether messages with this label are visible in the message list in Gmail's web interface.
namestringThe display name of the label as shown to the user in Gmail.
typestringThe owner type of the label. User labels can be modified and deleted; system labels are managed by Gmail and cannot be altered.

update_label_partial Update Label Partial

Update properties of a Gmail label using partial update semantics. Modify visibility settings, display name, or other label attributes without replacing the entire label configuration.

ParameterTypeDescription
id *stringThe unique identifier of the label to update.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
labelListVisibilitystringControls whether this label appears in the label list within Gmail's web interface.
messageListVisibilitystringControls whether messages with this label are visible in the message list within Gmail's web interface.
namestringThe human-readable name displayed for this label in the Gmail interface.
typestringIndicates whether this is a system label (created and managed by Gmail) or a user label (created and managed by the user). System labels cannot be modified or deleted, while user labels can be fully c…

delete_label Delete Label

Permanently deletes a label and removes it from all messages and threads it is applied to. This action cannot be undone.

ParameterTypeDescription
id *stringThe unique identifier of the label to delete.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.

delete_messages_batch Delete Messages Batch

Permanently deletes multiple messages by their IDs. Note that this operation provides no guarantees about message existence or prior deletion status.

ParameterTypeDescription
userId *stringThe user's email address or the special value `me` to indicate the authenticated user.
idsarrayAn array of message IDs to delete. The order of IDs is not significant.

update_message_labels_batch Update Message Labels Batch

Modifies labels on specified messages by adding and/or removing label IDs. Supports batch operations on up to 1000 messages per request.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
addLabelIdsarrayLabel IDs to add to the specified messages. Order is not significant.
idsarrayThe message IDs to modify. Maximum of 1000 IDs per request.
removeLabelIdsarrayLabel IDs to remove from the specified messages. Order is not significant.

get_message Get Message

Retrieves a specific message by ID from the user's mailbox. Supports multiple output formats including full message content, headers only, or raw RFC 2822 format.

ParameterTypeDescription
id *stringThe ID of the message to retrieve, typically obtained from messages.list, messages.insert, or messages.import operations.
userId *stringThe user's email address or the special value `me` to indicate the authenticated user.
formatstringThe format in which to return the message content and structure.
metadataHeadersarrayWhen format is set to `metadata`, specify which message headers to include in the response. Headers should be provided as an array of header names.

delete_message Delete Message

Permanently and immediately deletes a specified message. This action cannot be undone; consider using trash_message for recoverable deletion instead.

ParameterTypeDescription
id *stringThe unique identifier of the message to delete.
userId *stringThe email address of the user whose message will be deleted. Use the special value `me` to refer to the authenticated user.

import_message Import Message

Imports a message into the user's mailbox with standard email delivery scanning and classification. The message is processed similarly to SMTP delivery, with a maximum size limit of 150MB.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value 'me' to reference the authenticated user.
classificationLabelValuesarrayClassification label values to apply to the message. Each classification label ID must be unique; duplicate IDs will be deduplicated arbitrarily. Only applicable for Google Workspace accounts. Availab…
deletedbooleanMark the message as permanently deleted and only visible to Google Vault administrators. Only applicable for Google Workspace accounts.
email_bccstringBlind carbon copy recipients (Bcc header), comma-separated
email_bodystringEmail body content (plain text or HTML)
email_body_is_htmlbooleanWhether email_body is HTML (True) or plain text (False)
email_ccstringCarbon copy recipients (Cc header), comma-separated
email_fromstringSender email address (From header)
email_in_reply_tostringIn-Reply-To header (Message-ID of original message)
email_referencesstringReferences header (Message-IDs of related messages), space-separated
email_reply_tostringReply-To header address
email_subjectstringEmail subject line
email_tostringRecipient email address (To header)
internalDateSourcestringDetermines the source for Gmail's internal date assignment to the message.
labelIdsarrayList of label IDs to apply to the imported message. Labels are applied in the order provided.
neverMarkSpambooleanPrevent Gmail's spam classifier from marking this message as SPAM, regardless of its classification decision.
processForCalendarbooleanAutomatically process calendar invitations in the message and add any extracted meetings to the user's Google Calendar.

list_messages List Messages

Retrieves a list of messages from the user's mailbox, with optional filtering by labels and inclusion of spam/trash folders. Supports pagination through the maxResults parameter.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
after_datestringFilter messages after this date (YYYY/MM/DD format)
before_datestringFilter messages before this date (YYYY/MM/DD format)
custom_querystringCustom Gmail query string for advanced filters (e.g., 'rfc822msgid:<id>')
from_addressstringFilter messages from a specific sender email address
has_attachmentbooleanFilter messages that have attachments
includeSpamTrashbooleanInclude messages from SPAM and TRASH folders in the results. Defaults to false if not specified.
is_starredbooleanFilter starred messages only
is_unreadbooleanFilter unread messages only
labelIdsarrayFilter results to only include messages with labels matching all specified label IDs. Messages within the same thread may have different labels. Provide as an array of label ID strings.
maxResultsintegerMaximum number of messages to return per request. Defaults to 100 if not specified.
subject_containsstringFilter messages with subject containing this text
to_addressstringFilter messages to a specific recipient email address

insert_message Insert Message

Inserts a message directly into the user's mailbox, bypassing scanning and classification, similar to IMAP APPEND. This operation does not send a message but adds it to the mailbox with optional metadata.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value 'me' to refer to the authenticated user.
classificationLabelValuesarrayClassification label values to apply to the message. Each classification label ID must be unique; duplicate IDs will be deduplicated arbitrarily. Only applicable for Google Workspace accounts. Availab…
deletedbooleanMark the message as permanently deleted and only visible to Google Vault administrators. Only applicable for Google Workspace accounts.
email_bccstringBlind carbon copy recipients (Bcc header), comma-separated
email_bodystringEmail body content (plain text or HTML)
email_body_is_htmlbooleanWhether email_body is HTML (True) or plain text (False)
email_ccstringCarbon copy recipients (Cc header), comma-separated
email_fromstringSender email address (From header)
email_in_reply_tostringIn-Reply-To header (Message-ID of original message)
email_referencesstringReferences header (Message-IDs of related messages), space-separated
email_reply_tostringReply-To header address
email_subjectstringEmail subject line
email_tostringRecipient email address (To header)
internalDateSourcestringDetermines the source for Gmail's internal date assigned to the message.
labelIdsarrayList of label IDs to apply to this message. Labels are applied in the order provided.

update_message_labels Update Message Labels

Updates the labels applied to a specific message by adding and/or removing label IDs. You can modify up to 100 labels per request.

ParameterTypeDescription
id *stringThe unique identifier of the message to modify.
userId *stringThe email address of the user whose message will be modified. Use the special value `me` to refer to the authenticated user.
addLabelIdsarrayA list of label IDs to add to the message. Maximum of 100 labels can be added in a single request.
removeLabelIdsarrayA list of label IDs to remove from the message. Maximum of 100 labels can be removed in a single request.

send_message Send Message

Sends an email message to recipients specified in the To, Cc, and Bcc headers. The message is delivered immediately to all specified recipients.

ParameterTypeDescription
userId *stringThe email address of the user sending the message. Use the special value `me` to refer to the authenticated user.
classificationLabelValuesarrayClassification labels to apply to the message for organizational purposes. Each classification label ID must be unique; duplicate IDs will be deduplicated arbitrarily. Only available for Google Worksp…
email_bccstringBlind carbon copy recipients (Bcc header), comma-separated
email_bodystringEmail body content (plain text or HTML)
email_body_is_htmlbooleanWhether email_body is HTML (True) or plain text (False)
email_ccstringCarbon copy recipients (Cc header), comma-separated
email_fromstringSender email address (From header)
email_in_reply_tostringIn-Reply-To header (Message-ID of original message)
email_referencesstringReferences header (Message-IDs of related messages), space-separated
email_reply_tostringReply-To header address
email_subjectstringEmail subject line
email_tostringRecipient email address (To header)
labelIdsarrayIDs of labels to apply to the message. Labels help organize and categorize messages in Gmail.

move_message_to_trash Move Message to Trash

Moves a specified message to the trash folder. The message can be restored from trash before permanent deletion.

ParameterTypeDescription
id *stringThe unique identifier of the message to move to trash.
userId *stringThe user's email address or the special value `me` to reference the authenticated user.

remove_message_from_trash Remove Message From Trash

Restores a message from the trash by removing it from the trash folder. The message will be returned to its previous labels or inbox.

ParameterTypeDescription
id *stringThe unique identifier of the message to restore from trash.
userId *stringThe email address of the user whose message should be restored. Use the special value `me` to refer to the authenticated user.

get_message_attachment Get Message Attachment

Retrieves a specific attachment from a Gmail message. Use this to download or access attachment metadata by providing the message ID and attachment ID.

ParameterTypeDescription
id *stringThe unique identifier of the attachment to retrieve.
messageId *stringThe unique identifier of the message containing the attachment.
userId *stringThe email address of the account owner. Use the special value `me` to refer to the authenticated user's account.

get_auto_forwarding Get Auto Forwarding

Retrieves the auto-forwarding configuration for the specified Gmail account. This includes the forwarding address and whether auto-forwarding is enabled.

ParameterTypeDescription
userId *stringThe Gmail account identifier. Use the email address associated with the account, or use the special value "me" to refer to the authenticated user's account.

get_vacation_settings Get Vacation Settings

Retrieves the vacation responder settings for a Gmail account, including whether auto-reply is enabled and the message content.

ParameterTypeDescription
userId *stringThe Gmail user account identifier. Use 'me' to refer to the authenticated user, or provide a specific email address.

list_cse_identities List CSE Identities

Retrieves all client-side encrypted identities for an authenticated user. Administrators with domain-wide delegation can manage identities for their organization, while users managing their own identities require hardware key encryption to be enabled.

ParameterTypeDescription
userId *stringThe user's primary email address. Use the special value `me` to refer to the authenticated user.
pageSizeintegerMaximum number of identities to return per page. If not specified, defaults to 20 entries.

create_cse_identity Create CSE Identity

Creates and configures a client-side encryption identity for sending encrypted mail from a user account. The S/MIME certificate is published to a shared domain-wide directory, enabling secure communication within a Google Workspace organization.

ParameterTypeDescription
userId *stringThe requester's primary email address. Use the special value `me` to indicate the authenticated user.
emailAddressstringThe email address for the sending identity. Must be the primary email address of the authenticated user.

get_cse_identity Get CSE Identity

Retrieves a client-side encryption identity configuration for a specified email address. Administrators require service account with domain-wide delegation authority, while users require hardware key encryption to be enabled.

ParameterTypeDescription
cseEmailAddress *stringThe primary email address associated with the client-side encryption identity configuration to retrieve.
userId *stringThe requester's primary email address. Use the special value `me` to refer to the authenticated user.

delete_cse_identity Delete CSE Identity

Permanently deletes a client-side encryption identity, preventing further use for sending encrypted messages. The identity cannot be restored; create a new identity with the same configuration if needed.

ParameterTypeDescription
cseEmailAddress *stringThe primary email address associated with the client-side encryption identity to be deleted.
userId *stringThe user's primary email address. Use the special value `me` to refer to the authenticated user.

update_cse_identity_keypair Update CSE Identity Keypair

Associates a new key pair with an existing client-side encryption identity. The updated key pair must validate against Google's S/MIME certificate profiles. Requires either domain-wide delegation authority for administrators or hardware key encryption enabled for individual users.

ParameterTypeDescription
userId *stringThe user identifier. Use the special value `me` to refer to the authenticated user, or provide the user's primary email address.
emailAddressstringThe email address for the sending identity. Must be the primary email address of the authenticated user.

list_cse_keypairs List CSE Keypairs

Retrieves all client-side encryption key pairs for a user. Administrators with domain-wide delegation can manage keypairs for users in their organization, while individual users require hardware key encryption to be enabled.

ParameterTypeDescription
userId *stringThe user's primary email address. Use the special value `me` to refer to the authenticated user.
pageSizeintegerMaximum number of key pairs to return per page. If not specified, defaults to 20 entries.

create_cse_keypair Create CSE Keypair

Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for Gmail. Requires either domain-wide delegation authority for administrators or hardware key encryption enabled for individual users.

ParameterTypeDescription
userId *stringThe user's primary email address. Use the special value `me` to refer to the authenticated user.
pkcs7stringThe public key and its certificate chain in PKCS#7 format with PEM encoding and ASCII armor.
privateKeyMetadataarrayAn ordered array of metadata objects for instances of this key pair's private key. Order significance and item structure should follow the API specification.

disable_cse_keypair Disable CSE Keypair

Disables a client-side encryption key pair, preventing the user from decrypting incoming CSE messages or signing outgoing CSE mail. The key pair can be re-enabled later using enable_cse_keypair, or permanently deleted after 30 days using obliterate_cse_keypair.

ParameterTypeDescription
keyPairId *stringThe unique identifier of the key pair to disable.
userId *stringThe user's primary email address. Use the special value 'me' to refer to the authenticated user.

enable_cse_keypair Enable CSE Keypair

Reactivates a previously disabled client-side encryption key pair for use with associated encryption identities. Administrators require service account with domain-wide delegation authority; end users require hardware key encryption to be enabled.

ParameterTypeDescription
keyPairId *stringThe unique identifier of the key pair to reactivate.
userId *stringThe user's primary email address. Use the special value `me` to refer to the authenticated user.

get_cse_keypair Get CSE Keypair

Retrieves a client-side encryption key pair for Gmail. Administrators require service account authorization with domain-wide delegation, while users must have hardware key encryption enabled.

ParameterTypeDescription
keyPairId *stringThe unique identifier of the encryption key pair to retrieve.
userId *stringThe email address of the user whose key pair is being retrieved. Use the special value `me` to refer to the authenticated user.

delete_cse_keypair_permanently Delete CSE Keypair Permanently

Permanently and immediately deletes a client-side encryption key pair. The key pair must be disabled for at least 30 days before obliteration. Once obliterated, all messages encrypted with this key become permanently inaccessible to all users.

ParameterTypeDescription
keyPairId *stringThe unique identifier of the key pair to permanently delete.
userId *stringThe email address of the user whose key pair will be obliterated. Use the special value `me` to refer to the authenticated user.

list_delegates List Delegates

Retrieves the list of delegates for the specified Gmail account. This operation requires service account credentials with domain-wide delegation authority.

ParameterTypeDescription
userId *stringThe Gmail user account identifier. Use the special value 'me' to refer to the authenticated user, or provide the user's full email address.

get_delegate Get Delegate

Retrieves the delegate relationship for a specified email address. This operation requires service account clients with domain-wide authority and uses the delegate's primary email address (not aliases).

ParameterTypeDescription
delegateEmail *stringThe primary email address of the delegate whose relationship details should be retrieved. Email aliases cannot be used; the primary email address is required.
userId *stringThe email address of the user whose delegates are being queried. Use the special value 'me' to refer to the authenticated user.

list_filters List Filters

Retrieves all message filters configured for a Gmail account. Filters define rules for automatically organizing, labeling, or processing incoming messages.

ParameterTypeDescription
userId *stringThe Gmail user account identifier. Use the special value 'me' to refer to the authenticated user, or provide a specific email address.

get_filter Get Filter

Retrieves a specific Gmail filter by its ID. Use this to fetch the configuration and rules of an existing filter.

ParameterTypeDescription
id *stringThe unique identifier of the filter to retrieve.
userId *stringThe Gmail account identifier. Use 'me' to refer to the authenticated user, or provide the user's email address.

delete_filter Delete Filter

Permanently deletes a specified Gmail filter. This action is immediate and cannot be undone.

ParameterTypeDescription
id *stringThe unique identifier of the filter to be deleted.
userId *stringThe email address of the user whose filter will be deleted. Use the special value "me" to refer to the authenticated user.

list_forwarding_addresses List Forwarding Addresses

Retrieves all forwarding addresses configured for the specified Gmail account. Forwarding addresses are alternative email addresses where incoming messages can be automatically sent.

ParameterTypeDescription
userId *stringThe Gmail account identifier. Use the authenticated user's email address, or specify 'me' to refer to the currently authenticated user.

get_forwarding_address Get Forwarding Address

Retrieves the configuration details for a specified forwarding address associated with a Gmail account. Use this to view forwarding settings for a particular email address.

ParameterTypeDescription
forwardingEmail *stringThe email address for which forwarding configuration should be retrieved.
userId *stringThe Gmail account identifier. Use the special value 'me' to refer to the authenticated user's account, or provide the user's full email address.

delete_forwarding_address Delete Forwarding Address

Deletes a forwarding address and revokes any associated verification. This operation requires service account credentials with domain-wide delegation authority.

ParameterTypeDescription
forwardingEmail *stringThe forwarding email address to delete.
userId *stringThe user's email address or 'me' to reference the authenticated user.

list_send_as_aliases List Send As Aliases

Retrieves all send-as aliases configured for the specified Gmail account, including the primary email address and any custom 'from' aliases.

ParameterTypeDescription
userId *stringThe Gmail account identifier. Use 'me' to reference the authenticated user's account.

get_send_as_alias Get Send As Alias

Retrieves a specific send-as alias configuration for a user. Returns an HTTP 404 error if the specified email address is not configured as a send-as alias.

ParameterTypeDescription
sendAsEmail *stringThe email address of the send-as alias to retrieve.
userId *stringThe user's email address. Use the special value 'me' to refer to the authenticated user.

update_send_as_alias Update Send As Alias

Updates a send-as alias configuration for a Gmail account, including display name, reply-to address, and optional HTML signature. Service accounts with domain-wide delegation can update non-primary addresses; standard users can only modify their own aliases.

ParameterTypeDescription
userId *stringThe Gmail user's email address. Use the special value 'me' to refer to the authenticated user.
displayNamestringThe display name shown in the 'From:' header for messages sent using this alias. If empty for custom addresses, Gmail will use the primary account's name. Updates to this field may be silently ignored…
hoststringThe hostname of the SMTP server used for sending mail through this alias.
isDefaultbooleanWhether this alias is the default 'From:' address for new messages and auto-replies. Only 'true' can be written; setting this to true automatically sets the previous default address to false. Every Gm…
passwordstringThe password for SMTP authentication. This write-only field is used only during creation or updates and is never returned in responses.
portstringThe port number of the SMTP server.
replyToAddressstringAn optional email address to include in the 'Reply-To:' header for messages sent using this alias. Leave empty to omit the 'Reply-To:' header.
securityModestringThe security protocol for SMTP communication.
sendAsEmailstringThe email address displayed in the 'From:' header for messages sent using this alias. This field is read-only and cannot be modified after creation.
signaturestringAn optional HTML signature appended to new emails composed with this alias in Gmail's web interface. Gmail will sanitize the HTML before saving.
treatAsAliasbooleanWhether Gmail should treat this address as an alias for the user's primary email address. This setting applies only to custom 'from' aliases.
usernamestringThe username for SMTP authentication. This write-only field is used only during creation or updates and is never returned in responses.

update_send_as_alias_partial Update Send As Alias Partial

Partially update a send-as alias configuration for a Gmail account. Use this to modify display name, default status, reply-to address, signature, SMTP settings, or alias treatment without replacing the entire resource.

ParameterTypeDescription
userId *stringThe Gmail account identifier. Use 'me' to refer to the authenticated user, or provide a specific email address.
displayNamestringThe display name shown in the 'From:' header for messages sent using this alias. If empty, Gmail uses the primary account's name. Updates may be silently ignored if the admin has restricted name forma…
hoststringThe hostname of the SMTP server used to send mail through this alias.
isDefaultbooleanSet to true to make this the default 'From:' address for new messages and auto-replies. Only true is a valid value for updates; setting this true automatically sets the previous default to false.
passwordstringThe password for SMTP authentication. This write-only field is never returned in responses and must be provided when configuring SMTP settings.
portstringThe port number of the SMTP server. Common values are 25, 465, or 587 depending on the security mode.
replyToAddressstringAn optional email address to include in the 'Reply-To:' header for messages sent using this alias. Leave empty to omit the Reply-To header.
securityModestringThe security protocol for SMTP communication. Determines how the connection to the SMTP server is encrypted or secured.
sendAsEmailstringThe email address displayed in the 'From:' header for messages sent using this alias. This field is read-only for updates and can only be set during alias creation.
signaturestringAn optional HTML signature appended to new emails composed with this alias in Gmail's web interface. This signature is not added to replies or forwarded messages.
treatAsAliasbooleanWhether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom 'from' aliases and affects how Gmail handles replies and threading.
usernamestringThe username for SMTP authentication. This write-only field is never returned in responses and must be provided when configuring SMTP settings.

send_verification_email_to_send_as_alias Send Verification Email to Send As Alias

Sends a verification email to a send-as alias address to confirm ownership. The alias must have a pending verification status and requires service account with domain-wide delegation authority.

ParameterTypeDescription
sendAsEmail *stringThe send-as alias email address that requires verification.
userId *stringThe user's email address. Use the special value 'me' to refer to the authenticated user.

get_smime_info Get Smime Info

Retrieves the S/MIME configuration for a specified send-as alias. This allows you to access the details of a specific S/MIME certificate associated with an email alias.

ParameterTypeDescription
id *stringThe immutable identifier for the S/MIME configuration.
sendAsEmail *stringThe email address that appears in the From header for messages sent using this send-as alias.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.

delete_send_as_smime_config Delete Send As Smime Config

Deletes the S/MIME configuration for a specified send-as alias. This removes the security certificate associated with the alias used for signing and encrypting outgoing emails.

ParameterTypeDescription
id *stringThe immutable identifier for the S/MIME configuration to delete.
sendAsEmail *stringThe email address that appears in the From header for messages sent using this send-as alias.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.

list_smime_configs List Smime Configs

Lists all S/MIME configurations for a specified send-as alias. S/MIME configs define the certificates and encryption settings used when sending emails from this alias.

ParameterTypeDescription
sendAsEmail *stringThe email address configured as a send-as alias. This is the address that appears in the From header for emails sent using this alias.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.

create_smime_config Create SMIME Config

Upload and configure an S/MIME certificate for a send-as alias. The certificate must be provided in PKCS#12 format containing a private/public key pair and certificate chain.

ParameterTypeDescription
sendAsEmail *stringThe email address that will appear in the From header for messages sent using this S/MIME alias.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
encryptedKeyPasswordstringPassword for the encrypted private key, required if the PKCS#12 certificate is password-protected.
expirationstringCertificate expiration timestamp in milliseconds since epoch (Unix time).
isDefaultbooleanWhether to set this S/MIME certificate as the default for this send-as address.
pkcs12stringThe S/MIME certificate in PKCS#12 format. Must contain a single private/public key pair and certificate chain. The private key may be encrypted; if so, provide the password in encryptedKeyPassword.

set_default_smime_config Set Default Smime Config

Sets the default S/MIME configuration for the specified send-as alias. This determines which S/MIME certificate will be used by default when sending emails from this alias.

ParameterTypeDescription
id *stringThe immutable identifier for the S/MIME configuration to set as default.
sendAsEmail *stringThe email address that appears in the From header for mail sent using this send-as alias.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.

get_thread Get Thread

Retrieves a specific email thread by ID. Returns thread messages in the requested format with optional filtering of metadata headers.

ParameterTypeDescription
id *stringThe unique identifier of the thread to retrieve.
userId *stringThe email address of the user whose thread should be retrieved. Use the special value `me` to refer to the authenticated user.
formatstringThe format in which to return thread messages. Controls the level of detail included in the response.
metadataHeadersarrayWhen format is set to metadata, specify which email headers to include in the response. Headers should be provided as an array of header names.

delete_thread Delete Thread

Permanently deletes a thread and all messages within it. This action cannot be undone; consider using trash_thread as a safer alternative.

ParameterTypeDescription
id *stringThe unique identifier of the thread to delete.
userId *stringThe email address of the user whose thread will be deleted. Use the special value `me` to refer to the authenticated user.

list_threads List Threads

Retrieves a list of message threads from the user's mailbox, with optional filtering by labels, search query, and inclusion of spam/trash folders.

ParameterTypeDescription
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
includeSpamTrashbooleanInclude threads from the SPAM and TRASH folders in the results.
labelIdsarrayFilter results to only return threads that have all of the specified label IDs. Provide as an array of label ID strings.
maxResultsintegerMaximum number of threads to return in the response.
qstringFilter results using Gmail search query syntax (e.g., sender, subject, date filters, read status). Not supported when using the gmail.metadata scope.

update_thread_labels Update Thread Labels

Modifies the labels applied to a thread, affecting all messages within it. Supports adding and removing labels in a single operation.

ParameterTypeDescription
id *stringThe ID of the thread to modify.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.
addLabelIdsarrayA list of label IDs to add to this thread. Up to 100 labels can be added per request.
removeLabelIdsarrayA list of label IDs to remove from this thread. Up to 100 labels can be removed per request.

move_thread_to_trash Move Thread to Trash

Moves a thread and all its associated messages to the trash. The thread and its messages can be permanently deleted or recovered from trash.

ParameterTypeDescription
id *stringThe unique identifier of the thread to move to trash.
userId *stringThe user's email address or the special value 'me' to reference the authenticated user.

remove_thread_from_trash Remove Thread From Trash

Restores a thread from trash by removing it and all its associated messages from the trash folder.

ParameterTypeDescription
id *stringThe unique identifier of the thread to restore from trash.
userId *stringThe user's email address. Use the special value `me` to refer to the authenticated user.