## Tool: `forward`

Forwards a specific email message in the authenticated user's Gmail account. Optional comments can be added before the forwarded message using `forwardText` for plain text (do NOT format with Markdown) or `htmlBody` for rich HTML. Additional attachments can be included via the `attachments` field (in addition to any attachments on the original message), but the combined size cannot exceed 25MB. Set `includeSignature` to true to append the user's configured Gmail web signature to the forwarded message.

Returns a Message object with the `id`, `threadId`, `originalMessageId`, and `viewUrl` (if available) fields populated.

The following code sample shows how to use `curl` to call the `forward` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://gmailmcp.googleapis.com/mcp/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "forward", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

Request message for Forward RPC.

### ForwardRequest

| JSON representation |
|---|
| ``` { "messageId": string, "to": [ string ], "cc": [ string ], "bcc": [ string ], "attachments": [ { object (`Attachment`) } ], "includeSignature": boolean, "forwardText": string, "htmlBody": string } ``` |

| Fields ||
|---|---|
| `messageId` | `string` Required. The unique identifier of the message to forward. A specific `messageId` is required to forward, which can be obtained by retrieving the thread via `get_thread`. |
| `to[]` | `string` Optional. The primary recipients of the email. Each string MUST be a valid plain email address (e.g., "user@example.com"). |
| `cc[]` | `string` Optional. The carbon copy recipients of the email. Each string MUST be a valid plain email address (e.g., "user@example.com"). |
| `bcc[]` | `string` Optional. The blind carbon copy recipients of the email. Each string MUST be a valid plain email address (e.g., "user@example.com"). |
| `attachments[]` | ``object (`Attachment`)`` Optional. New attachments to include in the forwarded email, in addition to any attachments already present on the original message. 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 `forwardText` or `htmlBody`. |
| `includeSignature` | `boolean` Optional. Whether to append the user's configured Gmail web signature to the forwarded message. Defaults to false. |
| Union field `_forward_text`. `_forward_text` can be only one of the following: ||
| `forwardText` | `string` Optional. Plain text comments to add before the forwarded message. 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. |
|   ||
| Union field `_html_body`. `_html_body` can be only one of the following: ||
| `htmlBody` | `string` Optional. The HTML content of the comments to add before the forwarded message. If provided, this will be used as the rich-text version of the forward comments. Use this field (with valid HTML tags such as `p`, `b`, `ul`, `li`, `h1`) whenever rich text formatting is needed. |
|   ||

### Attachment

| JSON representation |
|---|
| ``` { "id": string, "filename": string, "mimeType": string, "content": string, "inline": boolean } ``` |

| Fields ||
|---|---|
| `id` | `string` Output only. When present, contains the ID of an external attachment. |
| `filename` | `string` Optional. The name of the file to be attached, e.g. "invoice.pdf". Email clients show this name to recipients for both regular and inline attachments. If not provided, the attachment may be received with no name. |
| `mimeType` | `string` Optional. The field representing a content or media type must use IANA MIME type, <https://www.iana.org/assignments/media-types/media-types.xhtml>. If not provided, defaults to "application/octet-stream". |
| `content` | `string (bytes format)` Required. The base64-encoded content of the attachment. A base64-encoded string. |
| `inline` | `boolean` Optional. If `true`, this attachment is handled as inline. An inline attachment is content, such as an image, that is displayed within the body of an HTML email instead of being listed as a separate file for download. To display an inline attachment, add an `img` element to `htmlBody` whose `src` is `cid:attN`, where N is the attachment's zero-based position in `attachments`, counting all attachments. For example, if `attachments` contains a PDF followed by an inline PNG, set `src="cid:att1"` on the PNG's `img` element. Don't reference inline attachments by `filename`. Other images in `htmlBody` are removed. If `false` or absent, defaults to `false`, and it's treated as a regular attachment. |

## Output Schema

Message within a thread.

### Message

| JSON representation |
|---|
| ``` { "id": string, "snippet": string, "subject": string, "sender": string, "toRecipients": [ string ], "ccRecipients": [ string ], "date": string, "plaintextBody": string, "attachmentIds": [ string ], "htmlBody": string, "bccRecipients": [ string ], "attachments": [ { object (`AttachmentMetadata`) } ], "labelIds": [ string ], "raw": string, "threadId": string, "historyId": string, "internalDate": string, "sizeEstimate": integer, "viewUrl": string, "addressDisplayNames": [ { object (`AddressDisplayName`) } ], "originalMessageId": string } ``` |

| Fields ||
|---|---|
| `id` | `string` The unique identifier of the message. |
| `snippet` | `string` Snippet of the message body. |
| `subject` | `string` The message subject extracted from headers. |
| `sender` | `string` Sender email address. |
| `toRecipients[]` | `string` To recipient email addresses. |
| `ccRecipients[]` | `string` CC recipient email addresses. |
| `date` | `string` Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ). |
| `plaintextBody` | `string` Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT. |
| `attachmentIds[]` | `string` Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT. |
| `htmlBody` | `string` The HTML content of the email, only populated if MessageFormat was FULL_CONTENT. |
| `bccRecipients[]` | `string` BCC recipient email addresses. |
| `attachments[]` | ``object (`AttachmentMetadata`)`` Output only. The attachments, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT. |
| `labelIds[]` | `string` The ids of the labels attached to the message. Includes ids of user labels and standard system labels limited to `INBOX`, `TRASH`, `UNREAD`, `STARRED`, `IMPORTANT`, `SENT`, `DRAFT`, `CHAT`, and the inbox category labels `CATEGORY_PERSONAL` (Primary tab), `CATEGORY_SOCIAL`, `CATEGORY_PROMOTIONS`, `CATEGORY_UPDATES`, `CATEGORY_FORUMS`. |
| `raw` | `string` The raw MIME message content, only populated if MessageFormat was RAW. |
| `threadId` | `string` Output only. The ID of the thread this message belongs to. |
| `historyId` | `string` Output only. The ID of the last history record that modified this message. |
| `internalDate` | `string` Output only. The internal message creation timestamp (epoch ms). |
| `sizeEstimate` | `integer` Output only. Estimated size in bytes of the message. |
| `viewUrl` | `string` Output only. Web URL to view the message in the Gmail Web UI. |
| `addressDisplayNames[]` | ``object (`AddressDisplayName`)`` Output only. Contains display names from the `From`, `To`, `Cc`, and `Bcc` headers, with one entry for each address in `sender`, `toRecipients`, `ccRecipients`, or `bccRecipients` whose header includes a display name. Addresses whose header has no display name are omitted. Use these names verbatim when referring to people instead of inferring a name from an email address. |
| Union field `_original_message_id`. `_original_message_id` can be only one of the following: ||
| `originalMessageId` | `string` Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages. |
|   ||

### AttachmentMetadata

| JSON representation |
|---|
| ``` { "id": string, "mimeType": string, "filename": string, "partId": string } ``` |

| Fields ||
|---|---|
| `id` | `string` Output only. The ID of the attachment. |
| `mimeType` | `string` The MIME type of the attachment. |
| `filename` | `string` The filename of the attachment. |
| `partId` | `string` Output only. The MIME part ID of the attachment (e.g., "1", "0.1"). This represents the 0-indexed hierarchical position of the part within the email MIME tree. The root message container is omitted, so direct top-level parts are indexed as "0", "1", etc. (they do not start with a "0." prefix). Nested multipart children append their sub-index (e.g., "0.1", "0.2"). |

### AddressDisplayName

| JSON representation |
|---|
| ``` { "emailAddress": string, "displayName": string } ``` |

| Fields ||
|---|---|
| `emailAddress` | `string` Output only. Specifies the email address, matching a value in `sender`, `toRecipients`, `ccRecipients`, or `bccRecipients`. |
| `displayName` | `string` Output only. Specifies the display name exactly as it appears in the header, for example `Alice Smith`. |

### Tool Annotations


[Tool annotations](https://modelcontextprotocol.io/specification/latest/schema#toolannotations) are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.


Along with the title string, the following boolean hints are defined as follows:

- `readOnlyHint`: If true, the tool doesn't modify its environment. Default: false.
- `destructiveHint`: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.
- `idempotentHint`: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.
- `openWorldHint`: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.

Destructive Hint: ❌ \| Idempotent Hint: ❌ \| Read Only Hint: ❌ \| Open World Hint: ✅

## Authorization Scopes

Requires one of the following OAuth scopes:

- `https://mail.google.com/`
- `https://www.googleapis.com/auth/gmail.modify`