Hosted MCP server · #6 most used on Smithery · ✓ verified

Gmail

gmail

Read, search, and send Gmail messages. Manage drafts, threads, and labels; reply, forward, archive, trash, report spam, and triage your inbox.

Uses
58k
Tools
31
Runs
Hosted
Listed
12mo ago

Get started

Add it to your agent

npx -y @smithery/cli@latest install gmail --client claude

Swap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.

What it can do

31 tools

Arcade_ListAppsSee the apps the current caller can act on and whether they are connected. Returns each app's id, name, connected state, and (when connec…

See the apps the current caller can act on and whether they are connected. Returns each app's id, name, connected state, and (when connected) the account it is connected as. Call this to answer "what apps do I have?" or when the caller's connection state may have changed since the session started.

Gmail_ArchiveEmail1 paramArchive exactly one email: remove inbox membership; email stays searchable.
ParameterTypeDescription
email_idstringThe Gmail ID of the email to archive. Exactly one email is updated per call.
Gmail_ChangeEmailLabels5 paramsAdd or remove one user-created label on at most 50 messages per call. A message already in the requested state is a noop, but the tool is…

Add or remove one user-created label on at most 50 messages per call. A message already in the requested state is a noop, but the tool is not idempotent in query mode: repeated calls with the same query advance to the next chunk, so a blind retry can label further messages. This lane does not accept Gmail system labels or triage state changes. Selector and label validation finish before mutation. Query selectors may match more than 50 messages; each call processes up to 50 remaining actionable m

ParameterTypeDescription
querystringA scoped Gmail search query. Defaults to no query. Provide exactly one selector: email_ids or query. Common operators/formats: from:, to:, subject:, label:, in:/is:, has:attachment, category:, filenam
actionstringWhether to add or remove the one user-created label.
email_idsarrayExplicit Gmail message IDs to act on (1-50). Defaults to no explicit IDs. Provide exactly one selector: email_ids or query. Duplicate IDs are removed (first occurrence kept), then the 50-ID cap is app
label_namestringExactly one existing user-created Gmail label name; system labels are rejected.
include_full_ledgerbooleanWhen true, items includes every processed message (changed/noop and problems). When false (default), items lists only non-success rows so the response stays count-first. Use counts.changed / counts.no
Gmail_ChangeThreadLabels3 paramsAdd and remove labels on every message in a thread using the Gmail API. Use this to change a whole conversation at once (for example, mar…

Add and remove labels on every message in a thread using the Gmail API. Use this to change a whole conversation at once (for example, marking a thread read by removing "UNREAD") instead of modifying each message. Label names match case-insensitively when there is no exact match. The confirmation reflects the labels actually present across the thread after the change, not the requested input.

ParameterTypeDescription
thread_idstringThe ID of the thread to modify labels for
labels_to_addarrayLabel names to add to every message. Pass an empty list to only remove labels.
labels_to_removearrayLabel names to remove from every message. Pass an empty list to only add labels.
Gmail_CreateLabel1 paramCreate a new label in the user's mailbox. Gmail treats label names as case-insensitive-unique; creating a name that already exists report…

Create a new label in the user's mailbox. Gmail treats label names as case-insensitive-unique; creating a name that already exists reports a conflict rather than a duplicate. Documented Gmail reserved SYSTEM label names (INBOX, SPAM, TRASH, …) are rejected before calling Gmail. Google's published list is non-exhaustive; upstream create errors remain the backstop for any other reserved name.

ParameterTypeDescription
label_namestringThe name of the label to create
Gmail_DeleteDraftEmail1 paramDelete a draft email using the Gmail API.
ParameterTypeDescription
draft_email_idstringThe ID of the draft email to delete
Gmail_DeleteLabel1 paramDelete a user-created label, resolving it by the name the user says. A misspelled name gets a close-match suggestion; a system label is r…

Delete a user-created label, resolving it by the name the user says. A misspelled name gets a close-match suggestion; a system label is rejected. Deleting a label removes it from the mailbox and from every message it was applied to.

ParameterTypeDescription
label_namestringThe name of the user label to delete.
Gmail_ForwardEmail5 paramsSend a copy of one message to new recipients as a new conversation. The forward quotes the original body, prefixes the subject with ``Fwd…

Send a copy of one message to new recipients as a new conversation. The forward quotes the original body, prefixes the subject with ``Fwd:``, carries filename-bearing attachments, and prepends the optional note. It does not reply to or change the original conversation.

ParameterTypeDescription
ccarrayCC recipients of the forward. Defaults to no CC recipients.
bccarrayBCC recipients of the forward. Defaults to no BCC recipients.
notestringA short note prepended above the quoted original. Omit to forward without a note.
email_idstringThe ID of the message to forward.
recipientstringThe address to forward the message to.
Gmail_GetEmail1 paramRead one message by ID without loading the rest of its thread. Returns parsed sender and recipient headers, the subject, text and HTML bo…

Read one message by ID without loading the rest of its thread. Returns parsed sender and recipient headers, the subject, text and HTML bodies, labels, dates, and attachment metadata. Attachment file bytes are not returned.

ParameterTypeDescription
email_idstringThe ID of the message to read.
Gmail_GetThread1 paramGet the specified thread by ID.
ParameterTypeDescription
thread_idstringThe ID of the thread to retrieve
Gmail_ListDraftEmails2 paramsLists draft emails in the user's draft mailbox using the Gmail API.
ParameterTypeDescription
n_draftsintegerNumber of draft emails to read (Min 1, Max 100, Default 25)
page_tokenstringPage token to retrieve a specific page of results in the list
Gmail_ListEmailAttachmentMetadata1 paramList metadata for a message's real attachments without loading their contents. Only genuine attachments are reported; unnamed body parts …

List metadata for a message's real attachments without loading their contents. Only genuine attachments are reported; unnamed body parts and body-embedded inline images are excluded. Each row includes its filename, MIME type, size, and Gmail attachment id when Gmail provides one.

ParameterTypeDescription
email_idstringThe id of the message whose attachment metadata to list.
Gmail_ListEmails4 paramsRead emails from a Gmail account. By default returns metadata-only rows (no body/html_body) so high-volume triage stays within the contex…

Read emails from a Gmail account. By default returns metadata-only rows (no body/html_body) so high-volume triage stays within the context budget. Pass include_body=True when full message text is needed. Metadata rows still include routing headers (to/cc/bcc/from/reply_to) and email_addresses. Obvious automated emails are excluded from results using no-reply sender patterns and Gmail's non-primary category filters (promotions, social, updates, forums). Set exclude_automated=False to include all

ParameterTypeDescription
n_emailsintegerNumber of emails to read (Min 1, Max 100, Default 25). Requests above 100 are clamped; the response includes limit_clamped_to_max=True when that happens.
page_tokenstringPagination cursor. Omit or pass None to start from the first page (default None). Copy pagination.next_page_token from a previous response to continue; blank or whitespace-only values are rejected.
include_bodybooleanInclude the full plain-text and HTML message bodies on each result. Defaults to False (metadata-only rows: id, from/to/cc/bcc/reply_to, subject, snippet, labels, date, email_addresses). Set to True on
exclude_automatedbooleanExclude obvious automated email using no-reply sender patterns and Gmail non-primary categories (promotions, social, updates, forums). Set to False when the user wants automated content like calendar
Gmail_ListEmailsByHeader10 paramsSearch for emails by header using the Gmail API. By default returns metadata-only rows (no body/html_body). Pass include_body=True when f…

Search for emails by header using the Gmail API. By default returns metadata-only rows (no body/html_body). Pass include_body=True when full message text is needed. Metadata rows still include routing headers (to/cc/bcc/from/reply_to) and email_addresses.

ParameterTypeDescription
bodyarrayBody search terms searched anywhere in the message text. A message matches if the body contains ANY value in the list (OR-combined). A single element is treated as free text (all of its words must app
labelstringLabel name to filter by. When this is a user-created label (not INBOX, SENT, or CATEGORY_*), category-based automated filters are skipped so labeled messages are not hidden by mistake. System labels s
senderarraySender names or email addresses to match. A message matches if it is from ANY value in the list (the values are OR-combined). Put each distinct person or address in its own list element; do not split
subjectarraySubject search terms. A message matches if its subject contains ANY value in the list (OR-combined). A single-word element matches broadly; a multi-word element matches as one phrase in the subject. O
recipientarrayRecipient names or email addresses to match. A message matches if it was sent to ANY value in the list (OR-combined). Put each distinct person or address in its own element. A single-word element or a
date_rangestringThe date range of the email
page_tokenstringPagination cursor. Omit or pass None to start from the first page (default None). Copy pagination.next_page_token from a previous response to continue; blank or whitespace-only values are rejected.
max_resultsintegerThe maximum number of emails to return (Min 1, Max 100, Default 25). Requests above 100 are clamped; the response includes limit_clamped_to_max=True when that happens.
include_bodybooleanInclude the full plain-text and HTML message bodies on each result. Defaults to False (metadata-only rows: id, from/to/cc/bcc/reply_to, subject, snippet, labels, date, email_addresses). Set to True on
exclude_automatedbooleanExclude obvious automated email using no-reply sender patterns and Gmail non-primary categories (promotions, social, updates, forums). Set to False when the user wants automated content like calendar
Gmail_ListLabelsList all the labels in the user's mailbox.
Gmail_ListThreads4 paramsList threads in the user's mailbox. By default, obvious automated threads are excluded from results using no-reply sender patterns and Gm…

List threads in the user's mailbox. By default, obvious automated threads are excluded from results using no-reply sender patterns and Gmail's non-primary category filters (promotions, social, updates, forums). Set exclude_automated=False to include all threads regardless of source.

ParameterTypeDescription
page_tokenstringPagination cursor. Omit or pass None to start from the first page (default None). Copy pagination.next_page_token from a previous response to continue; blank or whitespace-only values are rejected.
max_resultsintegerThe maximum number of threads to return (Min 1, Max 100, Default 25). Requests above 100 are clamped; the response includes limit_clamped_to_max=True when that happens.
exclude_automatedbooleanExclude obvious automated email using no-reply sender patterns and Gmail non-primary categories (promotions, social, updates, forums). Set to False when the user wants automated content like calendar
include_spam_trashbooleanWhether to include spam and trash in the results
Gmail_ReplyToEmail7 paramsSend a reply to an email message, optionally with one or more file attachments. To attach files, pass ``attachments`` and give each file'…

Send a reply to an email message, optionally with one or more file attachments. To attach files, pass ``attachments`` and give each file's local path as a ``file://`` URI in ``source`` (formatted ``file:///absolute/path/to/file``). The file's bytes are read and substituted on the client before the request is sent, so the contents never pass through this conversation. Do not read, encode, or inline the bytes yourself.

ParameterTypeDescription
ccarrayAdditional CC recipients. When replying to every recipient, merged with CC from the original message; duplicates are removed (RFC-aware). Duplicates of the reply's To recipients are dropped from Cc (R
bccarrayBCC recipients of the email. The authenticated user's own email address is removed from Bcc on replies.
bodystringThe body of the email, as plain text or HTML.
attachmentsarrayFiles to attach. Give each file's local path as a URI in 'source' (formatted file:///absolute/path/to/file); the file's bytes are read and substituted on the client before the request is sent, so do n
content_typestringHow the body is encoded on the wire. `auto` (default) sends as HTML and auto-converts plain-text input to paragraphs. `html` sends the body verbatim as HTML (use this when it contains entities or non-
reply_to_whomstringWhether to reply to every recipient (including cc) or only to the original sender. Defaults to 'GmailReplyToWhom.ONLY_THE_SENDER'.
reply_to_message_idstringThe ID of the message to reply to
Gmail_ReportSpam1 paramReport exactly one email as spam: move to Spam and remove from the inbox.
ParameterTypeDescription
email_idstringThe Gmail ID of the email to report as spam. Exactly one email is updated per call.
Gmail_SearchEmailsByQuery5 paramsSearch Gmail with a raw query and return one page in the requested detail mode. Results follow Gmail's default newest-first order. The de…

Search Gmail with a raw query and return one page in the requested detail mode. Results follow Gmail's default newest-first order. The default ``lightweight`` mode is metadata-only (routing/threading headers, no bodies). Count-only returns unhydrated identifier stubs plus Gmail's approximate match total — useful to estimate how many emails a query would affect before applying a bulk change. Full results add parsed plain and HTML bodies. ``pagination.total_estimate`` is always approximate.

ParameterTypeDescription
querystringRaw Gmail search query. Supports from:, to:, subject:, label:, in:/is:, has:attachment, category:, filename:, before:/after: YYYY/MM/DD, older_than:/newer_than: d/m/y, quoted phrases, implicit AND, OR
page_tokenstringOpaque page token from a previous response's pagination.next_page_token. Surrounding whitespace is trimmed; omit, leave null, or pass a blank value to fetch the first page.
max_resultsintegerMaximum number of matching emails to return on this page. Defaults to 10. Values below 1 are clamped to 1. Values above the active detail mode's cap are clamped, and the response includes limit_clampe
result_detailstringControls result hydration. Defaults to lightweight (metadata-only): compact previews (sender/to/cc/bcc/reply_to/subject/date/snippet/labels plus Message-ID/In-Reply-To/References) without bodies. coun
include_spam_trashbooleanInclude messages in Spam and Trash. Defaults to false. Automatically set to true when the query has a positive in:/label: operator targeting Spam or Trash.
Gmail_SearchThreads10 paramsSearch for threads in the user's mailbox.
ParameterTypeDescription
bodyarrayBody search terms searched anywhere in the message text. A thread matches if the body contains ANY value in the list (OR-combined). A single element is treated as free text (all of its words must appe
senderarraySender names or email addresses to match. A thread matches if it is from ANY value in the list (the values are OR-combined). Put each distinct person or address in its own list element; do not split o
subjectarraySubject search terms. A thread matches if its subject contains ANY value in the list (OR-combined). A single-word element matches broadly; a multi-word element matches as one phrase in the subject. Om
label_idsarrayLabel IDs to filter by. When every ID is a user-created label or CATEGORY_*, or when any ID is TRASH or SPAM, category-based automated filters are skipped so labeled messages are not hidden by mistake
recipientarrayRecipient names or email addresses to match. A thread matches if it was sent to ANY value in the list (OR-combined). Put each distinct person or address in its own element. A single-word element or an
date_rangestringThe date range of the email
page_tokenstringPagination cursor. Omit or pass None to start from the first page (default None). Copy pagination.next_page_token from a previous response to continue; blank or whitespace-only values are rejected.
max_resultsintegerThe maximum number of threads to return (Min 1, Max 100, Default 25). Requests above 100 are clamped; the response includes limit_clamped_to_max=True when that happens.
exclude_automatedbooleanExclude obvious automated email using no-reply sender patterns and Gmail non-primary categories (promotions, social, updates, forums). Set to False when the user wants automated content like calendar
include_spam_trashbooleanWhether to include spam and trash in the results. Defaults to False. Automatically set to True when label_ids includes the TRASH or SPAM system labels, because Gmail excludes those folders from search
Gmail_SendDraftEmail1 paramSend a draft email using the Gmail API.
ParameterTypeDescription
email_idstringThe ID of the draft to send
Gmail_SendEmail7 paramsSend an email using the Gmail API, optionally with one or more file attachments. To attach files, pass ``attachments`` and give each file…

Send an email using the Gmail API, optionally with one or more file attachments. To attach files, pass ``attachments`` and give each file's local path as a ``file://`` URI in ``source`` (formatted ``file:///absolute/path/to/file``). The file's bytes are read and substituted on the client before the request is sent, so the contents never pass through this conversation. Do not read, encode, or inline the bytes yourself.

ParameterTypeDescription
ccarrayCC recipients of the email
bccarrayBCC recipients of the email
bodystringThe body of the email, as plain text or HTML.
subjectstringThe subject of the email
recipientstringThe recipient of the email
attachmentsarrayFiles to attach. Give each file's local path as a URI in 'source' (formatted file:///absolute/path/to/file); the file's bytes are read and substituted on the client before the request is sent, so do n
content_typestringHow the body is encoded on the wire. `auto` (default) sends as HTML and auto-converts plain-text input to paragraphs. `html` sends the body verbatim as HTML (use this when it contains entities or non-
Gmail_SetThreadTrashStatus2 paramsSet whether an entire conversation is in Trash, affecting every message at once. Setting the current status again succeeds without changi…

Set whether an entire conversation is in Trash, affecting every message at once. Setting the current status again succeeds without changing the conversation.

ParameterTypeDescription
in_trashbooleanSet to true to move the whole conversation to Trash, or false to restore it.
thread_idstringThe id of the thread (conversation) to update.
Gmail_TrashEmail1 paramMove exactly one email to Trash (recoverable; may be auto-purged later).
ParameterTypeDescription
email_idstringThe Gmail ID of the email to trash. Exactly one email is updated per call.
Gmail_TriageEmails4 paramsApply one triage transition to at most 50 selected messages per call. Per-message transitions converge — a message already in the request…

Apply one triage transition to at most 50 selected messages per call. Per-message transitions converge — a message already in the requested state is a noop — but the tool is not idempotent in query mode: repeated calls with the same query advance to the next chunk, so a blind retry can mutate further messages. This lane owns read/unread, star/unstar, unarchive, untrash, importance, and not-spam. Archive, trash, and report_spam are not available on this tool. ``untrash`` uses per-message restore;

ParameterTypeDescription
querystringA scoped Gmail search query. Defaults to no query. Provide exactly one selector: email_ids or query. Common operators/formats: from:, to:, subject:, label:, in:/is:, has:attachment, category:, filenam
actionstringOne reversible system-state transition to apply uniformly to the selection.
email_idsarrayExplicit Gmail message IDs to act on (1-50). Defaults to no explicit IDs. Provide exactly one selector: email_ids or query. Duplicate IDs are removed (first occurrence kept), then the 50-ID cap is app
include_full_ledgerbooleanWhen true, items includes every processed message (changed/noop and problems). When false (default), items lists only non-success rows so the response stays count-first. Use counts.changed / counts.no
Gmail_UnsubscribeFromEmail2 paramsRequest removal from authenticated marketing mail and optionally trash it. Success means the unsubscribe *request* was accepted or sent —…

Request removal from authenticated marketing mail and optionally trash it. Success means the unsubscribe *request* was accepted or sent — not that the sender has finished removing the subscription. When trash is requested, ``trash_completed`` is true only after a verified expected-id + TRASH-label response; unverified or cancelled trash cleanup returns non-retryable ``partial`` uncertainty (do not retry / resend). Plain HTTPS ``manual_url`` values are signed/syntax-selected untrusted opaque navi

ParameterTypeDescription
email_idstringThe Gmail message ID from a message result, including a specific message within a thread. This must never be a thread ID.
trash_existingbooleanWhen true, attempt to move the source message to Trash after a confirmed unsubscribe request. trash_completed is true only when the Trash move is verified; otherwise the result is non-retryable partia
Gmail_UpdateDraftEmail6 paramsUpdate an existing email draft using the Gmail API. Single-part ``text/plain`` and single-part ``text/html`` drafts both support full bod…

Update an existing email draft using the Gmail API. Single-part ``text/plain`` and single-part ``text/html`` drafts both support full body replacement; the rebuild follows the existing draft's content type, so a plain draft stays plain and an HTML draft stays HTML. Plain-text input supplied against an HTML draft is auto-converted to HTML, and HTML input supplied against a plain draft is stored verbatim as ``text/plain``. Reply drafts preserve their reply-quote tail (``> `` lines for plain, ``<bl

ParameterTypeDescription
ccarrayCc recipients. Omit or pass None to preserve the existing Cc header; pass an empty list to clear Cc.
bccarrayBcc recipients. Omit or pass None to preserve the existing Bcc header; pass an empty list to clear Bcc.
bodystringUpdated body for the draft. There is no `content_type` argument — the body is encoded to match the existing draft, and reply drafts re-attach their existing reply-quote tail. For multipart drafts or d
subjectstringDraft subject. Omit or pass None to leave the existing subject unchanged.
recipientstringTo header. Omit or pass None to leave the existing recipient unchanged.
draft_email_idstringThe ID of the draft email to update.
Gmail_UpdateLabel2 paramsRename a user-created label, resolving it by the name the user says. The label's color and visibility settings are preserved. A misspelle…

Rename a user-created label, resolving it by the name the user says. The label's color and visibility settings are preserved. A misspelled name gets a close-match suggestion; a system label is rejected; renaming to a name that already exists reports a conflict. Documented reserved SYSTEM label names are rejected as the new name before calling Gmail (Google's list is non-exhaustive; upstream errors remain the backstop).

ParameterTypeDescription
new_namestringThe new name for the label.
current_namestringThe current name of the user label to rename.
Gmail_WhoAmIGet comprehensive user profile and Gmail account information. This tool provides detailed information about the authenticated user includ…

Get comprehensive user profile and Gmail account information. This tool provides detailed information about the authenticated user including their name, email, profile picture, Gmail account statistics, and other important profile details from Google services.

Gmail_WriteDraftEmail7 paramsCompose a new email draft using the Gmail API, optionally with file attachments. To attach files, pass ``attachments`` and give each file…

Compose a new email draft using the Gmail API, optionally with file attachments. To attach files, pass ``attachments`` and give each file's local path as a ``file://`` URI in ``source`` (formatted ``file:///absolute/path/to/file``). The file's bytes are read and substituted on the client before the request is sent, so the contents never pass through this conversation. Do not read, encode, or inline the bytes yourself.

ParameterTypeDescription
ccarrayCC recipients of the draft email
bccarrayBCC recipients of the draft email
bodystringThe body of the email, as plain text or HTML.
subjectstringThe subject of the draft email
recipientstringThe recipient of the draft email
attachmentsarrayFiles to attach. Give each file's local path as a URI in 'source' (formatted file:///absolute/path/to/file); the file's bytes are read and substituted on the client before the request is sent, so do n
content_typestringHow the body is encoded on the wire. `auto` (default) sends as HTML and auto-converts plain-text input to paragraphs. `html` sends the body verbatim as HTML (use this when it contains entities or non-
Gmail_WriteDraftReplyEmail7 paramsCompose a draft reply to an email message, optionally with one or more file attachments. To attach files, pass ``attachments`` and give e…

Compose a draft reply to an email message, optionally with one or more file attachments. To attach files, pass ``attachments`` and give each file's local path as a ``file://`` URI in ``source`` (formatted ``file:///absolute/path/to/file``). The file's bytes are read and substituted on the client before the request is sent, so the contents never pass through this conversation. Do not read, encode, or inline the bytes yourself.

ParameterTypeDescription
ccarrayAdditional CC recipients. When replying to every recipient, merged with CC from the original message; duplicates are removed (RFC-aware). Duplicates of the reply's To recipients are dropped from Cc (R
bccarrayBcc recipients of the draft reply email. The authenticated user's own email address is removed from Bcc on replies.
bodystringThe body of the email, as plain text or HTML.
attachmentsarrayFiles to attach. Give each file's local path as a URI in 'source' (formatted file:///absolute/path/to/file); the file's bytes are read and substituted on the client before the request is sent, so do n
content_typestringHow the body is encoded on the wire. `auto` (default) sends as HTML and auto-converts plain-text input to paragraphs. `html` sends the body verbatim as HTML (use this when it contains entities or non-
reply_to_whomstringWhether to reply to every recipient (including cc) or only to the original sender. Defaults to 'GmailReplyToWhom.ONLY_THE_SENDER'.
reply_to_message_idstringThe Gmail message ID of the message to draft a reply to