Gmail MCP server
Endpoint: https://gmailmcp.googleapis.com/mcp/v1 · Authentication: No auth
Google's Gmail server searches threads, reads threads and messages, creates and lists drafts, and manages labels, trash and spam in the user's mailbox. It has no send tool. Tool calls need Google OAuth.
How do I authenticate?
Add the endpoint directly in your client. The catalog records no authentication requirement; no OAuth sign-in or API key is configured in this setup. The live server may change.
Authentication and connection guideConnection specification
- Remote endpoint
https://gmailmcp.googleapis.com/mcp/v1- Browser access
- Not yet measured
- Declared MCP transport
- Streamable HTTP
- Live-validated MCP transport
- Streamable HTTP — Observed by the latest catalog validation
- Declared authentication
- No authentication
- Detected authentication
- No authentication detected or retained from publisher evidence
- Alternative authentication
- OAuth 2.1
- Protocol lifecycle
- Stateless MCP · 2026-07-28
- Authorization server
https://accounts.google.com/- Category
- Communication
Product documentation · Official listing documentation · Claude connector directory listing
Provider guidance
- Only the tool list is public: tools/list answers without credentials, but tool calls return 401 until the user signs in with Google OAuth (the server advertises accounts.google.com as its authorization server).
- Google lists these servers in its Workspace Developer Preview Program. The OAuth client is pre-registered in the user's own Google Cloud project with the MCP service enabled; the server does not advertise Dynamic Client Registration.
More Communication MCP servers · Browse all MCP servers · Test this endpoint in the MCP Playground
Connect it
Live-validated endpoint: https://gmailmcp.googleapis.com/mcp/v1 · Streamable HTTP. No authentication is required by the catalog listing.
Agent prompt for Claude Code or Codex
Add the Gmail MCP server to my MCP client configuration and verify that it works. What it is: Google's Gmail server searches threads, reads threads and messages, creates and lists drafts, and manages labels, trash and spam in the user's mailbox. It has no send tool. Tool calls need Google OAuth. Server URL: https://gmailmcp.googleapis.com/mcp/v1 Transport: Streamable HTTP (remote MCP server, no local install). Authentication: none. The server accepts connections without credentials. Tools (23, as last observed by mcptest): apply_sensitive_message_label, apply_sensitive_thread_label, create_draft, create_label, get_draft, get_message, get_thread, label_message, label_thread, list_drafts, list_labels, mark_message_spam, mark_thread_spam, search_threads, trash_message, trash_thread, unlabel_message, unlabel_thread, unmark_message_spam, unmark_thread_spam, untrash_message, untrash_thread, update_message_labels. Reference: https://mcptest.io/servers/gmail/ Steps: 1. Work out which MCP client I use (Claude Code, Codex, Cursor, VS Code or another) and add the server under the name "gmail" in that client's MCP configuration, user scope unless I ask otherwise. Claude Code: claude mcp add --transport http --scope user 'gmail' 'https://gmailmcp.googleapis.com/mcp/v1' Codex: codex mcp add 'gmail' --url 'https://gmailmcp.googleapis.com/mcp/v1' Other clients: use the setup for that client on the reference page. 2. Never write a credential value into a file that could be committed; reference an environment variable or the client's secret store, and ask me for any value you need. 3. Verify: connect to the server and call tools/list. Confirm the tools above are listed, and report any sign-in step I still have to complete.
Claude Code setup
Run in a terminal. This user-scoped entry is available across projects.
claude mcp add --transport http --scope user 'gmail' 'https://gmailmcp.googleapis.com/mcp/v1'Codex CLI setup
Run in a terminal; Codex stores the entry in ~/.codex/config.toml.
codex mcp add 'gmail' --url 'https://gmailmcp.googleapis.com/mcp/v1'Cursor setup
Add to .cursor/mcp.json for this project, or ~/.cursor/mcp.json for all projects.
{
"mcpServers": {
"gmail": {
"url": "https://gmailmcp.googleapis.com/mcp/v1"
}
}
}VS Code setup
Add to .vscode/mcp.json, or run “MCP: Open User Configuration” for a private user-level entry.
{
"servers": {
"gmail": {
"type": "http",
"url": "https://gmailmcp.googleapis.com/mcp/v1"
}
}
}Claude setup
Add the endpoint above in Claude:
- Customize > Connectors > Add custom connector
- Team/Enterprise: Organization settings > Connectors > Add > Custom > Web
Claude Desktop setup
Add the endpoint above in Claude Desktop:
- Remote: Customize > Connectors (same as claude.ai)
- Local: Settings > Developer > Edit Config, or Settings > Extensions for .mcpb files
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows), local servers only
ChatGPT setup
Add the endpoint above in ChatGPT:
- ChatGPT web: Plugins > Add custom MCP server, then configure authentication and accept the risk warning
Windsurf setup
Add the endpoint above in Windsurf:
~/.config/devin/mcp_config.json(%APPDATA%\devin\mcp_config.jsonon Windows),serverUrlorurl- Cascade panel > ... > MCPs > Open MCP config file
Gemini CLI setup
Add the endpoint above in Gemini CLI:
gemini mcp add --transport http <name> <url>~/.gemini/settings.json(user) or.gemini/settings.json(project),mcpServers
MCP SDK setup
Add the endpoint above in MCP SDK:
- Programmatic:
new Client(...).connect(new StreamableHTTPClientTransport(url))
Notes for every client
- An optional oauth flow is cataloged, but its exact header is not documented; follow the publisher instructions instead of guessing.
- Provider guidance: Only the tool list is public: tools/list answers without credentials, but tool calls return 401 until the user signs in with Google OAuth (the server advertises accounts.google.com as its authorization server).
- Provider guidance: Google lists these servers in its Workspace Developer Preview Program. The OAuth client is pre-registered in the user's own Google Cloud project with the MCP service enabled; the server does not advertise Dynamic Client Registration.
Client compatibility
| Client | Status | Why |
|---|---|---|
| Claude Code | Supported | Claude Code supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| Codex | Supported | Codex supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| Cursor | Supported | Cursor supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| VS Code | Supported | VS Code supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| Claude | Supported | Claude supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| Claude Desktop | Supported | Claude Desktop supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| ChatGPT | Supported | ChatGPT supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| Windsurf | Partial | Windsurf's documentation does not state support for servers without authentication. |
| Gemini CLI | Supported | Gemini CLI supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
| MCP SDK | Supported | MCP SDK supports Streamable HTTP servers and servers without authentication or OAuth sign-in. |
Computed from this server's validated transport, protocol and authentication against documented client support. Checks the catalog has not observed are not counted.
Latest validation evidence
- Validation status
- Online when last tested
- Validation checked at
- Nov 23, 2026 at 7:17 PM
- Validation detail
- Negotiated stateless MCP 2026-07-28 at https://gmailmcp.googleapis.com/mcp/v1; detected transport streamable-http; authentication none; WARNING: OAuth authorization servers advertised; an anonymous MCP handshake does not establish anonymous tool access
Tool inventory
What the catalog validator observed on at https://gmailmcp.googleapis.com/mcp/v1 without credentials. The live server may have changed since; connect in the Playground for the current list.
Tools provided by Gmail 23
Some details were sanitized for public display.
apply_sensitive_message_labeloutputSchema declaredPrefer `trash_message` or `mark_message_spam` instead. Adds a sensitive label (Trash or Spam) to a single message in the authenticated user's Gmail account. Use `apply_sensitive_message_label` when applying Trash or Spam to exactly 1 message. If the message belongs to a thread that should be labeled as a whole, prefer `trash_thread` or `mark_thread_spam`. To find the message ID, use the `get_thread` tool. To find the draft message ID, use tools like `list_drafts`.
Input
labelOption: string, messageId: stringlabelOption: stringrequiredRequired. The sensitive label option to add.
messageId: stringrequiredRequired. The ID of the message to add the label to.
apply_sensitive_thread_labeloutputSchema declaredPrefer `trash_thread` or `mark_thread_spam` instead. Adds a sensitive label (Trash or Spam) to a single thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread. Use `apply_sensitive_thread_label` when applying Trash or Spam to exactly 1 thread.
Input
labelOption: string, threadId: stringlabelOption: stringrequiredRequired. The sensitive label option to add.
threadId: stringrequiredRequired. The ID of the thread to add the label to.
create_draftoutputSchema declaredCreates a new draft email in the authenticated user's Gmail account. This tool takes recipient addresses (`to`, `cc`, `bcc`), a `subject`, and body content as inputs. Plain text body content can be provided in `body` (do NOT format `body` with Markdown), and rich-text HTML content can be provided in `htmlBody` (use valid HTML tags for formatting; if both are provided, `body` serves as the plain-text alternative). If the draft is created as a reply to an existing message, the ID of the original message should be passed to the tool in the `replyToMessageId` field. Set `includeSignature` to true
Input
attachments?: array, bcc?: array, body?: string, cc?: array, htmlBody?: string, includeSignature?: boolean, replyToMessageId?: string, subject?: string, to?: arrayattachments?: arrayoptionalOptional. The attachments to include in the email. The combined size of attachments in the message cannot exceed 25MB. If you need to send files larger than 25MB, upload the file to Drive first and then insert the Drive link into `body` or `htmlBody`.
bcc?: arrayoptionalOptional. The blind carbon copy recipients of the email draft. Each string MUST be a valid plain email address (e.g., "[email protected]").
body?: stringoptionalOptional. The plain text body content of the email draft. Do NOT format this field with Markdown (such as headers `#`, bold `**`, bullet points `*`, or tables `|`). If formatted rich text is desired, use `htmlBody` instead. If `htmlBody` is also provided, this field is treated as the plain-text alternative.
cc?: arrayoptionalOptional. The carbon copy recipients of the email draft. Each string MUST be a valid plain email address (e.g., "[email protected]").
htmlBody?: stringoptionalOptional. The HTML content of the email draft. If provided, this will be used as the rich-text version of the email. Use this field (with valid HTML tags such as `p`, `b`, `ul`, `li`, `h1`) whenever rich text formatting is needed.
includeSignature?: booleanoptionalOptional. Whether to append the user's configured Gmail web signature to the draft. Defaults to false.
replyToMessageId?: stringoptionalOptional. The ID of the message to reply to. If provided, this will be used as the reply-to message ID for the email draft, and the `body` and `htmlBody` will be appended to the original message body.
subject?: stringoptionalOptional. The subject line of the email. Defaults to empty if not provided.
to?: arrayoptionalOptional. The primary recipients of the email draft. Each string MUST be a valid plain email address (e.g., "[email protected]").
create_labeloutputSchema declaredCreates a new label in the authenticated user's Gmail account. Supports creating nested labels (sub-labels) using a forward slash (e.g., 'Projects/Alpha/Sprint-1'). By default, parent labels will be automatically created if they do not exist.
Input
autoCreateParentLabels?: boolean, color?: any, colorPreset?: string, displayName: string, labelListVisibility?: string, messageListVisibility?: stringautoCreateParentLabels?: booleanoptionalOptional. Whether to automatically create parent labels for nested labels (separated by `/`). Defaults to `true`. When set to `true`, missing parent labels in the hierarchy (e.g., `Projects` and `Projects/Alpha` for `Projects/Alpha/Sprint-1`) are created automatically. When set to `false`, parent label auto-creation is disabled.
color?: anyoptionalDeprecated: Do not use. Use `colorPreset` instead. Legacy field for raw text and background color hex strings.
colorPreset?: stringoptionalOptional. The color preset tile to assign to the new label. Select from predefined contrast-safe color options (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE, LABEL_COLOR_PRESET_BLACK, LABEL_COLOR_PRESET_GREEN). If omitted, default label styling is applied.
displayName: stringrequiredRequired. The display name of the label to create. Supports nested label hierarchy using `/` (e.g., `Projects/Alpha/Sprint-1`).
labelListVisibility?: stringoptionalOptional. The visibility of the label in the label list in the Gmail web interface. Defaults to `LABEL_SHOW`.
messageListVisibility?: stringoptionalOptional. The visibility of messages with this label in the message list in the Gmail web interface. Defaults to `SHOW`.
get_draftoutputSchema declaredRetrieves a specific draft email from the authenticated user's Gmail account by ID, including its `viewUrl` for viewing and editing in the Gmail Web UI. The optional `messageFormat` parameter controls the format of the draft returned. By default (or with `PLAIN_TEXT`), it returns the plain text body without the HTML body. Use `MINIMAL` to return snippet and key headers, `METADATA_ONLY` to exclude snippet, subject, and body, `FULL_CONTENT` for the complete draft including the HTML body, or `RAW` for the raw MIME message content.
Input
draftId: string, messageFormat?: stringdraftId: stringrequiredRequired. The unique identifier of the draft to fetch.
messageFormat?: stringoptionalOptional. Specifies the format of the draft returned. Defaults to `PLAIN_TEXT`.
get_messageoutputSchema declaredRetrieves a specific email message from the authenticated user's Gmail account by its unique message ID, including its `viewUrl`. Use this tool to inspect a single, individual email when you already know its message ID. If the user wants to read a specific email in detail, check the exact wording of a message, or examine attachment metadata for a single email, this is the right tool. It is not suitable for retrieving entire conversations or viewing back-and-forth discussion threads; use the 'get_thread' tool instead. Note: This tool does not support retrieving draft messages. To view drafts, u
Input
messageFormat?: string, messageId: stringmessageFormat?: stringoptionalOptional. Specifies the format of the message returned. Defaults to `PLAIN_TEXT`. Use `FULL_CONTENT` only when the HTML body is needed.
messageId: stringrequiredRequired. The unique identifier of the message to fetch.
get_threadoutputSchema declaredRetrieves a specific email thread from the authenticated user's Gmail account, including its `viewUrl` and a list of its messages (each with their own `viewUrl`). Note: This tool does not support retrieving drafts. Any draft messages within a thread are omitted. To view drafts, use the `list_drafts` tool instead. The optional `messageFormat` parameter controls the format of the messages returned. By default (or with `PLAIN_TEXT`), it returns the plain text body without the HTML body. Use `FULL_CONTENT` only when the HTML body is needed. Use `MINIMAL` to include only subject and snippet (exclud
Input
messageFormat?: string, threadId: stringmessageFormat?: stringoptionalOptional. Specifies the format of the messages returned within the thread. Defaults to `PLAIN_TEXT`. Use `FULL_CONTENT` only when the HTML body is needed. Note: `MINIMAL` format returns `id`, `snippet`, `subject`, `sender`, `toRecipients`, `ccRecipients`, `bccRecipients`, `date`, `labelIds`, `viewUrl` (if applicable). `METADATA_ONLY` format returns `id`, `sender`, `toRecipients`, `ccRecipients`, `bccRecipients`, `date`, `labelIds`, `viewUrl` (if applicable). `FULL_CONTENT` returns `id`, `snippet`, `subject`, `sender`, `toRecipients`, `ccRecipients`, `bccRecipients`, `date`, `labelIds`, `attach
threadId: stringrequiredRequired. The unique identifier of the thread to fetch.
label_messageoutputSchema declaredAdds one or more labels to a specific message in the authenticated user's Gmail account. To find the message ID, use the `get_thread` tool. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs. To move a message to a different inbox category tab, add the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary); Gmail automatically removes the previous category. To move a specific message to Trash or mark it as Spam, please use the `trash_message` or `mark_message_spam` tool instead.
Input
labelIds: array, messageId: stringlabelIds: arrayrequiredRequired. The IDs of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `labelIds` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
messageId: stringrequiredRequired. The ID of the message to add the labels to.
label_threadoutputSchema declaredAdds labels to an entire thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread and any future messages added to it. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs. To move a thread to a different inbox category tab, add the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary); Gmail automatically removes the previous category. To move a thread to Trash or mark it as Spam, please use the `trash_thread` or `mark_thread_spam` tool instead.
Input
labelIds: array, threadId: stringlabelIds: arrayrequiredRequired. The unique identifiers of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `labelIds` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
threadId: stringrequiredRequired. The unique identifier of the thread to add labels to.
list_draftsoutputSchema declaredLists draft emails from the authenticated user's Gmail account, optionally filtered by a query string. Note: An empty JSON object `{}` represents zero matching items, not an error.
Input
pageSize?: integer, pageToken?: string, query?: string, view?: stringpageSize?: integeroptionalOptional. The maximum number of drafts to return. If unspecified, defaults to 20. The maximum allowed value is 50.
pageToken?: stringoptionalOptional. A token received from a previous `list_drafts` call to retrieve the next page of results. Leave empty to fetch the first page. This is primarily used for pagination to continue fetching results from where the previous `ListDraft` call left off, especially when the number of drafts matching the query exceeds the `pageSize` limit.
query?: stringoptionalOptional. A query string to filter the drafts. Natural language queries must be pre-converted into Gmail compatible syntax queries to use this tool. If omitted, all drafts (excluding spam and trash by default) are listed. The tool inherently only searches for drafts. Supported Operators by Category: Sender & Recipient: - `from:EMAIL` - Sent from a specific person. - `to:EMAIL` - Sent to a specific person. - `cc:EMAIL` - Specific people in Cc. - `bcc:EMAIL` - Specific people in Bcc. - `deliveredto:EMAIL` - Delivered to a specific address. - `list:EMAIL` - From a specific mailing list. Time & Da
view?: stringoptionalOptional. Controls the fields populated for drafts in the draft list. Defaults to returning metadata only (`id`, `threadId`, `toRecipients`, `ccRecipients`, `bccRecipients`, `date`). Set to `DRAFT_VIEW_FULL` to include `subject` and `plaintextBody` content.
list_labelsoutputSchema declaredLists all labels available in the authenticated user's Gmail account. Use this tool to discover the `labelId` and display `name` of each label in `labels` before calling `label_thread`, `unlabel_thread`, `label_message`, or `unlabel_message`. Note: the system labels, `DRAFT` and `SENT`, cannot be set on messages and are read only. Inbox category tabs are represented by system labels: `CATEGORY_PERSONAL` (Primary), `CATEGORY_SOCIAL` (Social), `CATEGORY_PROMOTIONS` (Promotions), `CATEGORY_UPDATES` (Updates), and `CATEGORY_FORUMS` (Forums). A message has at most one category: adding a category la
Input No parameters
mark_message_spamoutputSchema declaredMarks a specific message as Spam in the authenticated user's Gmail account. To find the message ID, use the `get_thread` tool.
Input
messageId: stringmessageId: stringrequiredRequired. The ID of the message to mark as Spam.
mark_thread_spamoutputSchema declaredMarks an entire thread as Spam in the authenticated user's Gmail account. This operation affects all messages currently in the thread. Use `mark_thread_spam` when marking a thread as spam, even if it currently contains only 1 message. Marking spam at the thread level ensures all current messages in the thread are marked as Spam.
Input
threadId: stringthreadId: stringrequiredRequired. The ID of the thread to mark as Spam.
search_threadsoutputSchema declaredLists email threads from the authenticated user's Gmail account. This tool can filter threads based on a query string and supports pagination. It returns a list of threads, each with its thread `id`, `messageCount` (total messages in the thread), `viewUrl`, and a subset of up to 5 related messages (each with its own message `id`, `viewUrl`, `sender`, recipients, `date`, and `labelIds`). Use this tool to find thread `id`s matching a query before reading full threads or performing actions on matching emails or threads. The `view` parameter controls which additional fields are populated in the re
Input
includeTrash?: boolean, pageSize?: integer, pageToken?: string, query?: string, view?: stringincludeTrash?: booleanoptionalOptional. Include threads from TRASH in the results. Defaults to false.
pageSize?: integeroptionalOptional. The maximum number of threads to return. If unspecified, defaults to 20. The maximum allowed value is 50.
pageToken?: stringoptionalOptional. Page token to retrieve a specific page of results in the list. Leave empty to fetch the first page. This is primarily used for pagination to continue fetching results from where the previous `SearchThreads` call left off, especially when the number of threads matching the query exceeds the `pageSize` limit.
query?: stringoptionalOptional. A query string to filter the threads. Natural language queries must be pre-converted into Gmail syntax queries to use this tool. If omitted, all threads (excluding spam and trash by default) are listed. Supported Operators by Category: Sender & Recipient: - `from:EMAIL` - Sent from a specific person. - `to:EMAIL` - Sent to a specific person. - `cc:EMAIL` - Specific people in Cc. - `bcc:EMAIL` - Specific people in Bcc. - `deliveredto:EMAIL` - Delivered to a specific address. - `list:EMAIL` - From a specific mailing list. Time & Date: - `after:YYYY/MM/DD` / `newer:YYYY/MM/DD` - Receive
view?: stringoptionalOptional. Controls the fields populated for threads in the thread list. Defaults to `THREAD_VIEW_MINIMAL`. `THREAD_VIEW_MINIMAL` returns `id`, `snippet`, `subject`, `sender`, `toRecipients`, `ccRecipients`, `bccRecipients`, `date`, `labelIds`, `viewUrl` (if applicable). `THREAD_VIEW_METADATA_ONLY` returns `id`, `sender`, `toRecipients`, `ccRecipients`, `bccRecipients`, `date`, `labelIds`, `viewUrl` (if applicable). `THREAD_VIEW_IDS_ONLY` returns only `id` on each `Thread` without fetching per-thread message metadata. `THREAD_VIEW_SUMMARY` returns `THREAD_VIEW_MINIMAL` fields with only the most
trash_messageoutputSchema declaredMoves a specific message to the Trash (soft delete) in the authenticated user's Gmail account. This is the default tool (along with `trash_thread`) when a user asks to 'delete', 'remove', or 'get rid of' a message without explicitly requesting permanent, irreversible deletion. Use `trash_message` when targeting a specific message within a thread. To trash an entire thread or a single-message thread, prefer `trash_thread`. To find the message ID, use the `get_thread` tool. To find the draft message ID, use tools like `list_drafts`.
Input
messageId: stringmessageId: stringrequiredRequired. The ID of the message to move to Trash.
trash_threadoutputSchema declaredMoves an entire thread to the Trash (soft delete) in the authenticated user's Gmail account. This operation affects all messages currently in the thread. This is the default tool (along with `trash_message`) when a user asks to 'delete', 'remove', or 'get rid of' an email or thread without explicitly requesting permanent, irreversible deletion. Use `trash_thread` when trashing a thread, even if it currently contains only 1 message. Trashing at the thread level ensures all current messages in the thread are moved to Trash.
Input
threadId: stringthreadId: stringrequiredRequired. The ID of the thread to move to Trash.
unlabel_messageoutputSchema declaredRemoves one or more labels from a specific message in the authenticated user's Gmail account. To find the message ID, use the `get_thread` tool. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs.
Input
labelIds: array, messageId: stringlabelIds: arrayrequiredRequired. The IDs of the labels to remove. Can be a system label ID (e.g., `INBOX`, `TRASH`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. `SPAM` cannot be removed with this tool. The tool accepts `labelIds` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
messageId: stringrequiredRequired. The ID of the message to remove the labels from.
unlabel_threadoutputSchema declaredRemoves labels from an entire thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread. Use `unlabel_thread` when removing labels from an email or thread (such as marking it as read by removing `UNREAD`, archiving it by removing `INBOX`, or removing user-defined labels), even if the thread currently contains only 1 message. If unsure of a user label's ID, use the `list_labels` tool first.
Input
labelIds: array, threadId: stringlabelIds: arrayrequiredRequired. The unique identifiers of the labels to remove. Can be a system label ID (e.g., `INBOX`, `TRASH`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. `SPAM` cannot be removed with this tool. The tool accepts `labelIds` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
threadId: stringrequiredRequired. The unique identifier of the thread to remove labels from.
unmark_message_spamoutputSchema declaredUnmarks a specific message as Spam in the authenticated user's Gmail account. This does not return the message to the Inbox; to move it to the Inbox, add the `INBOX` label separately. To find the message ID, use the `get_thread` tool.
Input
messageId: stringmessageId: stringrequiredRequired. The ID of the message to unmark as Spam.
unmark_thread_spamoutputSchema declaredUnmarks an entire thread as Spam in the authenticated user's Gmail account. This does not return the thread to the Inbox; to move it to the Inbox, add the `INBOX` label separately.
Input
threadId: stringthreadId: stringrequiredRequired. The ID of the thread to unmark as Spam.
untrash_messageoutputSchema declaredRemoves a specific message from the Trash in the authenticated user's Gmail account. This does not return the message to the Inbox; to move it to the Inbox, add the `INBOX` label separately. To find the message ID, use the `get_thread` tool.
Input
messageId: stringmessageId: stringrequiredRequired. The ID of the message to remove from Trash.
untrash_threadoutputSchema declaredRemoves an entire thread from the Trash in the authenticated user's Gmail account. This does not return the thread to the Inbox; to move it to the Inbox, add the `INBOX` label separately.
Input
threadId: stringthreadId: stringrequiredRequired. The ID of the thread to remove from Trash.
update_message_labelsoutputSchema declaredAtomically adds and/or removes labels from a specific message in the authenticated user's Gmail account. Requires at least one of `addLabelIds` or `removeLabelIds` to be provided. Moving an email between labels can be accomplished in a single call by specifying the target label in `addLabelIds` and the current label in `removeLabelIds`. For inbox category tabs, adding the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary) is sufficient; Gmail automatically removes the previous category.
Input
addLabelIds?: array, messageId: string, removeLabelIds?: arrayaddLabelIds?: arrayoptionalOptional. The IDs of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID.
messageId: stringrequiredRequired. The ID of the message to modify labels for.
removeLabelIds?: arrayoptionalOptional. The IDs of the labels to remove. Can be a system label ID or a user-defined label ID.