--- asIndexPage: true --- # Gmail import ToolInfo from "@/app/_components/tool-info"; import Badges from "@/app/_components/badges"; import TabbedCodeBlock from "@/app/_components/tabbed-code-block"; import TableOfContents from "@/app/_components/table-of-contents"; import ToolFooter from "@/app/_components/tool-footer"; import ScopePicker from "@/app/_components/scope-picker"; import { Callout } from "nextra/components"; The Arcade Gmail MCP Server provides a pre-built set of tools for interacting with Gmail. These tools make it easy to build agents and AI apps that can: - Send, read, and manage emails - Compose and update draft emails - Delete emails - Search for emails by header - List emails in the user's mailbox ## Available Tools These tools are currently available in the Arcade Gmail MCP Sever. If you need to perform an action that's not listed here, you can [get in touch with us](mailto:contact@arcade.dev) to request a new tool, or [create your own tools](/guides/create-tools/tool-basics/build-mcp-server) with the [Google auth provider](/references/auth-providers/google#using-google-auth-in-custom-tools). Each tool requires specific Google OAuth scopes to function. You'll find the required scopes listed in a blue info box at the end of each tool's documentation below. For more information about configuring OAuth and tips for moving to production, see the [Google auth provider documentation](/references/auth-providers/google. ## Find required scopes Select the tools you plan to use to see the OAuth scopes your application needs: --- ## Gmail.SendEmail
Send an email using the Gmail API. **Parameters** - **`subject`** _(string, required)_ The subject of the email. - **`body`** _(string, required)_ The body of the email. - **`recipient`** _(string, required)_ The recipient of the email. - **`cc`** _(array, optional, Defaults to None)_ CC recipients of the email. - **`bcc`** _(array, optional, Defaults to None)_ BCC recipients of the email. `https://www.googleapis.com/auth/gmail.send` --- ## Gmail.SendDraftEmail
Send a draft email using the Gmail API. **Parameters** - **`email_id`** _(string, required)_ The ID of the draft to send. `https://www.googleapis.com/auth/gmail.send` --- ## Gmail.WriteDraftEmail
Compose a new email draft using the Gmail API. **Parameters** - **`subject`** _(string, required)_ The subject of the draft email. - **`body`** _(string, required)_ The body of the draft email. - **`recipient`** _(string, required)_ The recipient of the draft email. - **`cc`** _(array, optional, Defaults to None)_ CC recipients of the draft email. - **`bcc`** _(array, optional, Defaults to None)_ BCC recipients of the draft email. `https://www.googleapis.com/auth/gmail.compose` --- ## Gmail.UpdateDraftEmail
Update an existing email draft. **Parameters** - **`draft_email_id`** _(string, required)_ The ID of the draft email to update. - **`subject`** _(string, required)_ The subject of the draft email. - **`body`** _(string, required)_ The body of the draft email. - **`recipient`** _(string, required)_ The recipient of the draft email. - **`cc`** _(array, optional, Defaults to None)_ CC recipients of the draft email. - **`bcc`** _(array, optional, Defaults to None)_ BCC recipients of the draft email. `https://www.googleapis.com/auth/gmail.compose` --- ## Gmail.DeleteDraftEmail
Delete a draft email using the Gmail API. **Parameters** - **`draft_email_id`** _(string, required)_ The ID of the draft email to delete. `https://www.googleapis.com/auth/gmail.compose` --- ## Gmail.TrashEmail The `TrashEmail` tool is currently only available on a self-hosted instance of the Arcade Engine. To learn more about self-hosting, see the [self-hosting documentation](http://localhost:3000/en/home/deployment/engine-configuration).
Move an email to the trash folder. **Parameters** - **`email_id`** _(string, required)_ The ID of the email to trash. `https://www.googleapis.com/auth/gmail.modify` --- ## Gmail.ListDraftEmails
List draft emails in the user's mailbox. **Parameters** - **`n_drafts`** _(integer, optional, Defaults to 5)_ Number of draft emails to read. `https://www.googleapis.com/auth/gmail.readonly` --- ## Gmail.ListEmailsByHeader
Search for emails by header using the Gmail API. _At least one of the following parameters must be provided: `sender`, `recipient`, `subject`, `body`._ **Parameters** - **`sender`** _(string, optional, Defaults to None)_ The name or email address of the sender. - **`recipient`** _(string, optional, Defaults to None)_ The name or email address of the recipient. - **`subject`** _(string, optional, Defaults to None)_ Words to find in the subject of the email. - **`body`** _(string, optional, Defaults to None)_ Words to find in the body of the email. - **`date_range`** _(string, optional, Defaults to None)_ The date range of the emails. - **`limit`** _(integer, optional, Defaults to 25)_ The maximum number of emails to return. `https://www.googleapis.com/auth/gmail.readonly` --- ## Gmail.ListEmails
Read emails from a Gmail account and extract plain text content. **Parameters** - **`n_emails`** _(integer, optional, Defaults to 5)_ Number of emails to read. `https://www.googleapis.com/auth/gmail.readonly` --- ## Gmail.SearchThreads
Search for threads in the user's mailbox **Parameters** - **`page_token`** _(string, optional)_ Page token to retrieve a specific page of results in the list. - **`max_results`** _(integer, optional, Defaults to `10`)_ The maximum number of threads to return. - **`include_spam_trash`** _(boolean, optional)_ Whether to include spam and trash in the results. - **`label_ids`** _(array, optional)_ The IDs of labels to filter by. - **`sender`** _(string, optional)_ The name or email address of the sender of the email. - **`recipient`** _(string, optional)_ The name or email address of the recipient. - **`subject`** _(string, optional)_ Words to find in the subject of the email. - **`body`** _(string, optional)_ Words to find in the body of the email. - **`date_range`** _(string, optional)_ The date range of the email. Valid values are 'today', 'yesterday', 'last_7_days', 'last_30_days', 'this_month', 'last_month', 'this_year'. `https://www.googleapis.com/auth/gmail.readonly` --- ## Gmail.ListThreads
List threads in the user's mailbox. **Parameters** - **`page_token`** _(string, optional)_ Page token to retrieve a specific page of results in the list. - **`max_results`** _(integer, optional, Defaults to `10`)_ The maximum number of threads to return. - **`include_spam_trash`** _(boolean, optional)_ Whether to include spam and trash in the results. `https://www.googleapis.com/auth/gmail.readonly` --- ## Gmail.GetThread
Get the specified thread by ID. **Parameters** - **`thread_id`** _(string, required)_ The ID of the thread to retrieve. `https://www.googleapis.com/auth/gmail.readonly` --- ## Gmail.WhoAmI
Get comprehensive user profile and Gmail account information. **Parameters** This tool does not take any parameters. - `https://www.googleapis.com/auth/gmail.readonly` - `https://www.googleapis.com/auth/userinfo.profile` - `https://www.googleapis.com/auth/userinfo.email` --- ## Auth The Arcade Gmail MCP Sever uses the [Google auth provider](/references/auth-providers/google to connect to users' Google accounts. With the Arcade Cloud Platform, there's nothing to configure. Your users will see `Arcade` as the name of the application that's requesting permission. With a self-hosted installation of Arcade, you need to [configure the Google auth provider](/references/auth-providers/google#configuring-google-auth) with your own Google app credentials. --- ## Reference ### GmailReplyToWhom The type of recipient to reply to. - **`EVERY_RECIPIENT`**: Reply to the original sender and all recipients. - **`ONLY_THE_SENDER`**: Reply to the original sender only.