Gmail — Tool Reference
Read, send, and manage Gmail messages
Your AI assistant discovers and invokes these tools through the
MCP Server's meta tools —
it calls execute_tool with the tool name and arguments below.
# batch_modify_messages write
Apply or remove labels on up to 1000 emails in a single call — bulk archive, mark-read, star, trash, or label. Use when the user says "archive all of these", "mark them all read", "star all", "delete these emails", or wants the same change applied to many messages. For one message, use modify_message.
Full description
Modify labels on multiple Gmail messages at once.
Efficiently applies the same label changes to many messages in a
single API call. Maximum 1000 messages per batch.
Parameters:
message_ids: List of message IDs to modify (required, max 1000)
add_labels: Label IDs to add to all messages (optional)
remove_labels: Label IDs to remove from all messages (optional)
Returns:
BatchModifyMessagesResult with success status and count
Examples:
- Archive all: message_ids=[...], remove_labels=["INBOX"]
- Mark all read: message_ids=[...], remove_labels=["UNREAD"] | Parameter | Type | Required | Description |
|---|---|---|---|
message_ids | array<string> | Yes | List of message IDs to modify (max 1000) |
add_labels | array<string> | null | No | Label IDs to add |
remove_labels | array<string> | null | No | Label IDs to remove |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch these message_ids from search_messages — message IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for batch_modify_messages.",
"properties": {
"message_ids": {
"description": "List of message IDs to modify (max 1000)",
"items": {
"type": "string"
},
"title": "Message Ids",
"type": "array"
},
"add_labels": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to add",
"title": "Add Labels"
},
"remove_labels": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to remove",
"title": "Remove Labels"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch these message_ids from search_messages — message IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"message_ids"
],
"title": "BatchModifyMessagesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of batch_modify_messages.",
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"modified_count": {
"default": 0,
"title": "Modified Count",
"type": "integer"
}
},
"title": "BatchModifyMessagesResult",
"type": "object"
} # create_draft write
Compose a brand-new email and save to Drafts without sending — standalone, not a reply. Use when the user wants to write a fresh message and review or edit it later, or when explicitly asked for a draft to a new recipient. NOT for replying to an existing message — use reply_to_message_as_draft so threading headers are set correctly. Supports cc, bcc, and file attachments.
Full description
Create a new draft message, optionally with file attachments.
Saves a draft that can be edited in Gmail or sent later using send_draft.
Parameters:
to: Recipient email address(es) (required)
subject: Email subject line (required)
body: Email body text (required)
cc: CC recipients (optional)
bcc: BCC recipients (optional)
attachments: List of file attachments (optional). Each item is an object with:
- filename: Name for the file (e.g. "report.pdf")
- mime_type: MIME type (e.g. "application/pdf", "image/png")
- data: Base64-encoded file content. Max 3 MB per attachment after decoding.
Returns:
CreateDraftResult with the draft's ID | Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient email address(es) |
subject | string | Yes | Email subject line |
body | string | Yes | Email body text |
cc | string | null | No | CC recipients |
bcc | string | null | No | BCC recipients |
attachments | array<AttachmentInput> | null | No | List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding. |
account | string | null | No | Optional Gmail account to create the draft in (email). Omit to use the user's default account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"$defs": {
"AttachmentInput": {
"description": "An attachment to include with an outbound message. Max 3 MB per attachment.",
"properties": {
"filename": {
"description": "Filename for the attachment (e.g., 'report.pdf')",
"title": "Filename",
"type": "string"
},
"mime_type": {
"description": "MIME type (e.g., 'application/pdf', 'image/png')",
"title": "Mime Type",
"type": "string"
},
"data": {
"description": "Base64-encoded attachment content. Max 3 MB per attachment after decoding.",
"title": "Data",
"type": "string"
}
},
"required": [
"filename",
"mime_type",
"data"
],
"title": "AttachmentInput",
"type": "object",
"additionalProperties": false
}
},
"description": "Parameters for create_draft.",
"properties": {
"to": {
"description": "Recipient email address(es)",
"title": "To",
"type": "string"
},
"subject": {
"description": "Email subject line",
"title": "Subject",
"type": "string"
},
"body": {
"description": "Email body text",
"title": "Body",
"type": "string"
},
"cc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CC recipients",
"title": "Cc"
},
"bcc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "BCC recipients",
"title": "Bcc"
},
"attachments": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AttachmentInput"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding.",
"title": "Attachments"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account to create the draft in (email). Omit to use the user's default account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"required": [
"to",
"subject",
"body"
],
"title": "CreateDraftParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_draft.",
"properties": {
"draft_id": {
"default": "",
"description": "ID of the created draft",
"title": "Draft Id",
"type": "string"
},
"id": {
"default": "",
"description": "Gmail message resource ID of the draft message",
"title": "Id",
"type": "string"
}
},
"title": "CreateDraftResult",
"type": "object"
} # create_filter write
Create a Gmail filter that auto-applies actions (label, archive, star, delete) to incoming messages matching given criteria (sender, subject, keyword query, attachment presence, size). Use when the user says "set up a filter for…", "auto-archive emails from X", "automatically label Y as Z", or "make a rule that…". Needs at least one criterion and one action. Requires the gmail.settings.basic OAuth scope.
Full description
Create a new Gmail email filter.
Filters automatically apply actions to incoming messages that match
the specified criteria. At least one criterion and at least one
action must be provided. Requires the gmail.settings.basic scope.
Parameters:
Criteria (at least one required):
from_match: Match sender address
to_match: Match recipient address
subject: Match subject line
query: Gmail search query for matching
has_attachment: Match messages with attachments
negated_query: Exclude messages matching this query
size: Message size threshold in bytes
size_comparison: 'larger' or 'smaller'
Actions (at least one required):
add_label_ids: Label IDs to add to matching messages (use 'STARRED' to star)
remove_label_ids: Label IDs to remove from matching messages
Returns:
CreateFilterResult with the created filter's ID | Parameter | Type | Required | Description |
|---|---|---|---|
from_match | string | null | No | Match sender address |
to_match | string | null | No | Match recipient address |
subject | string | null | No | Match subject line |
query | string | null | No | Gmail search query for matching |
has_attachment | boolean | null | No | Match messages with attachments |
negated_query | string | null | No | Exclude messages matching this query |
size | integer | null | No | Message size threshold in bytes |
size_comparison | string | null | No | Size comparison: 'larger' or 'smaller' |
add_label_ids | array<string> | null | No | Label IDs to add to matching messages (use 'STARRED' to star) |
remove_label_ids | array<string> | null | No | Label IDs to remove from matching messages |
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for create_filter.\n\nAt least one criterion and at least one action must be provided.",
"properties": {
"from_match": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match sender address",
"title": "From Match"
},
"to_match": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match recipient address",
"title": "To Match"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match subject line",
"title": "Subject"
},
"query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Gmail search query for matching",
"title": "Query"
},
"has_attachment": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Match messages with attachments",
"title": "Has Attachment"
},
"negated_query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Exclude messages matching this query",
"title": "Negated Query"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Message size threshold in bytes",
"title": "Size"
},
"size_comparison": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Size comparison: 'larger' or 'smaller'",
"title": "Size Comparison"
},
"add_label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to add to matching messages (use 'STARRED' to star)",
"title": "Add Label Ids"
},
"remove_label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to remove from matching messages",
"title": "Remove Label Ids"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"title": "CreateFilterParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_filter.",
"properties": {
"filter_id": {
"default": "",
"description": "ID of the created filter",
"title": "Filter Id",
"type": "string"
}
},
"title": "CreateFilterResult",
"type": "object"
} # create_label write
Create a new user-defined label for organizing emails. Use when the user says "make a label called X", "add an X label", or wants to start tagging emails with a category that doesn't exist yet. To then apply the label to messages, use modify_message or batch_modify_messages with the returned label ID.
Full description
Create a new Gmail label.
Creates a user label for organizing messages. Labels can be applied
to messages using modify_message or batch_modify_messages.
Parameters:
name: Label name (required)
label_list_visibility: Visibility in label list (default 'labelShow')
message_list_visibility: Visibility in message list (default 'show')
Returns:
CreateLabelResult with the created label's ID and name | Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the new label |
label_list_visibility | string | No | Visibility in label list: 'labelShow', 'labelShowIfUnread', or 'labelHide' Default: "labelShow" |
message_list_visibility | string | No | Visibility in message list: 'show' or 'hide' Default: "show" |
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for create_label.",
"properties": {
"name": {
"description": "Name for the new label",
"title": "Name",
"type": "string"
},
"label_list_visibility": {
"default": "labelShow",
"description": "Visibility in label list: 'labelShow', 'labelShowIfUnread', or 'labelHide'",
"title": "Label List Visibility",
"type": "string"
},
"message_list_visibility": {
"default": "show",
"description": "Visibility in message list: 'show' or 'hide'",
"title": "Message List Visibility",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"required": [
"name"
],
"title": "CreateLabelParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_label.",
"properties": {
"id": {
"default": "",
"description": "ID of the created label",
"title": "Id",
"type": "string"
},
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"type": {
"default": "",
"title": "Type",
"type": "string"
}
},
"title": "CreateLabelResult",
"type": "object"
} # delete_filter write
Permanently delete a Gmail filter, given a filter_id. Destructive and not undoable — the auto-rule stops applying to future mail. Use when the user says "delete that filter", "remove the X rule", or "stop auto-archiving Y". Requires the gmail.settings.basic OAuth scope.
Full description
Delete a Gmail email filter by its ID.
This is a destructive operation that cannot be undone.
Requires the gmail.settings.basic scope.
Parameters:
filter_id: Gmail filter ID to delete (required)
Returns:
DeleteFilterResult with success status | Parameter | Type | Required | Description |
|---|---|---|---|
filter_id | string | Yes | Gmail filter ID to delete |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this filter_id from list_filters — filter IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for delete_filter.",
"properties": {
"filter_id": {
"description": "Gmail filter ID to delete",
"title": "Filter Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this filter_id from list_filters — filter IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"filter_id"
],
"title": "DeleteFilterParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of delete_filter.",
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
}
},
"title": "DeleteFilterResult",
"type": "object"
} # delete_label write
Permanently delete a user-created label, given a label_id. Destructive and not undoable — emails with the label lose it but are not themselves deleted. System labels (INBOX, SENT, TRASH, etc.) cannot be deleted. Use when the user says "delete the X label" or "remove that label".
Full description
Delete a Gmail label by its ID.
Permanently deletes a user-created label. System labels (INBOX, SENT,
TRASH, etc.) cannot be deleted. This is a destructive operation that
cannot be undone — messages with this label will lose the label but
are not deleted themselves.
Parameters:
label_id: Gmail label ID to delete (required)
Returns:
DeleteLabelResult with success status
Errors:
ProviderError: Label does not exist (404) or is a system label | Parameter | Type | Required | Description |
|---|---|---|---|
label_id | string | Yes | Gmail label ID to delete |
account | string | null | No | Optional Gmail account override (email). Pass the same account the label belongs to — label IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for delete_label.",
"properties": {
"label_id": {
"description": "Gmail label ID to delete",
"title": "Label Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account the label belongs to — label IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"label_id"
],
"title": "DeleteLabelParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of delete_label.",
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
}
},
"title": "DeleteLabelResult",
"type": "object"
} # forward_message write
Forward an existing email to new recipients, preserving the original body and all original attachments. Use when the user says "forward this to…", "fwd to…", or "send this along to…". Optionally adds a comment above the forwarded content. Extra attachments may be included alongside the original ones. Supports cc and bcc.
Full description
Forward a Gmail message to new recipients, optionally with additional attachments.
Fetches the original message content and attachments, then sends
a new message with forwarded content and all original attachments.
Optionally prepends a user comment above the forwarded content.
Additional attachments can be included alongside the original ones.
Parameters:
message_id: ID of the message to forward (required)
to: Recipient email address(es) (required)
comment: Optional comment above forwarded content
cc: CC recipients (optional)
bcc: BCC recipients (optional)
attachments: Additional file attachments (optional) sent alongside the original message's
attachments (which are forwarded automatically). Each item is an object with:
- filename: Name for the file (e.g. "report.pdf")
- mime_type: MIME type (e.g. "application/pdf", "image/png")
- data: Base64-encoded file content. Max 3 MB per attachment after decoding.
Returns:
ForwardMessageResult with the forwarded message's ID | Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | ID of the message to forward |
to | string | Yes | Recipient email address(es), comma-separated |
comment | string | null | No | Optional comment above forwarded content |
cc | string | null | No | CC recipients |
bcc | string | null | No | BCC recipients |
attachments | array<AttachmentInput> | null | No | Additional file attachments to include alongside the original message's attachments (which are forwarded automatically). Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding. |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. The forward is also sent FROM this account. |
Parameter schema (JSON)
{
"$defs": {
"AttachmentInput": {
"description": "An attachment to include with an outbound message. Max 3 MB per attachment.",
"properties": {
"filename": {
"description": "Filename for the attachment (e.g., 'report.pdf')",
"title": "Filename",
"type": "string"
},
"mime_type": {
"description": "MIME type (e.g., 'application/pdf', 'image/png')",
"title": "Mime Type",
"type": "string"
},
"data": {
"description": "Base64-encoded attachment content. Max 3 MB per attachment after decoding.",
"title": "Data",
"type": "string"
}
},
"required": [
"filename",
"mime_type",
"data"
],
"title": "AttachmentInput",
"type": "object",
"additionalProperties": false
}
},
"description": "Parameters for forward_message.",
"properties": {
"message_id": {
"description": "ID of the message to forward",
"title": "Message Id",
"type": "string"
},
"to": {
"description": "Recipient email address(es), comma-separated",
"title": "To",
"type": "string"
},
"comment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional comment above forwarded content",
"title": "Comment"
},
"cc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CC recipients",
"title": "Cc"
},
"bcc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "BCC recipients",
"title": "Bcc"
},
"attachments": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AttachmentInput"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Additional file attachments to include alongside the original message's attachments (which are forwarded automatically). Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding.",
"title": "Attachments"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. The forward is also sent FROM this account.",
"title": "Account"
}
},
"required": [
"message_id",
"to"
],
"title": "ForwardMessageParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of forward_message.",
"properties": {
"id": {
"default": "",
"description": "ID of the forwarded message",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
}
},
"title": "ForwardMessageResult",
"type": "object"
} # get_attachment read
Download an email attachment as base64-encoded data, given a message_id and attachment_id. Use after get_message has returned attachment metadata and the user wants the actual file content. Attachment IDs come from get_message — they are not message IDs.
Full description
Download an email attachment by its attachment ID.
Returns the attachment content as base64-encoded data. Use the
attachment_id from get_message results to identify attachments.
Parameters:
message_id: ID of the message containing the attachment (required)
attachment_id: Attachment ID from get_message results (required)
Returns:
GetAttachmentResult with:
- data: Base64-encoded attachment content
- size: Attachment size in bytes | Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | Gmail message ID containing the attachment |
attachment_id | string | Yes | Attachment ID from get_message results |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch the parent message_id. |
Parameter schema (JSON)
{
"description": "Parameters for get_attachment.",
"properties": {
"message_id": {
"description": "Gmail message ID containing the attachment",
"title": "Message Id",
"type": "string"
},
"attachment_id": {
"description": "Attachment ID from get_message results",
"title": "Attachment Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch the parent message_id.",
"title": "Account"
}
},
"required": [
"message_id",
"attachment_id"
],
"title": "GetAttachmentParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_attachment.",
"properties": {
"data": {
"default": "",
"description": "Standard base64-encoded (RFC 4648 §4) attachment content, decodable with Python base64.b64decode or Node Buffer.from(data, 'base64').",
"title": "Data",
"type": "string"
},
"size": {
"default": 0,
"title": "Size",
"type": "integer"
}
},
"title": "GetAttachmentResult",
"type": "object"
} # get_filter read
Read one filter's matching criteria and actions, given a filter_id. Use when the user wants details on a specific filter found via list_filters. Requires the gmail.settings.basic OAuth scope.
Full description
Get a single Gmail filter by its ID.
Requires the gmail.settings.basic scope.
Parameters:
filter_id: Gmail filter ID (required)
Returns:
GetFilterResult with filter id, criteria, and action | Parameter | Type | Required | Description |
|---|---|---|---|
filter_id | string | Yes | Gmail filter ID |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this filter_id from list_filters — filter IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for get_filter.",
"properties": {
"filter_id": {
"description": "Gmail filter ID",
"title": "Filter Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this filter_id from list_filters — filter IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"filter_id"
],
"title": "GetFilterParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"FilterAction": {
"description": "Filter actions to apply on matching messages.",
"properties": {
"add_label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to add (use 'STARRED' to star)",
"title": "Add Label Ids"
},
"remove_label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to remove",
"title": "Remove Label Ids"
}
},
"title": "FilterAction",
"type": "object"
},
"FilterCriteria": {
"description": "Filter matching criteria.",
"properties": {
"from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match sender address",
"title": "From"
},
"to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match recipient address",
"title": "To"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match subject line",
"title": "Subject"
},
"query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Gmail search query for matching",
"title": "Query"
},
"negated_query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Exclude messages matching this query",
"title": "Negated Query"
},
"has_attachment": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Match messages with attachments",
"title": "Has Attachment"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Message size threshold in bytes",
"title": "Size"
},
"size_comparison": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Size comparison: 'larger' or 'smaller'",
"title": "Size Comparison"
}
},
"title": "FilterCriteria",
"type": "object"
}
},
"description": "Result of get_filter.",
"properties": {
"id": {
"default": "",
"description": "Filter ID",
"title": "Id",
"type": "string"
},
"criteria": {
"anyOf": [
{
"$ref": "#/$defs/FilterCriteria"
},
{
"type": "null"
}
],
"default": null
},
"action": {
"anyOf": [
{
"$ref": "#/$defs/FilterAction"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "GetFilterResult",
"type": "object"
} # get_message read
Read one email's full content — body text, all headers (subject/from/to/cc/date), threading IDs, and attachment metadata — given a message_id. Use when you already have a specific message ID and need its body or attachments. HTML is stripped to plain text; bodies over ~50KB are truncated. To download an attachment, follow up with get_attachment.
Full description
Get a single Gmail message with full MIME-parsed content.
Retrieves the complete message including parsed body text, headers,
and attachment metadata. Body is returned as clean plain text (HTML
is stripped if no text/plain part exists). Bodies over ~50KB are
truncated with an indicator.
Parameters:
message_id: Gmail message ID (required)
Returns:
GetMessageResult with full message content including:
- Headers: subject, from, to, cc, bcc, date
- Threading: message_id (RFC 2822), references, in_reply_to
- body: Clean plain text content
- attachments: List of attachment metadata (use get_attachment to download)
Use get_attachment to download attachment content by attachment_id. | Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | Gmail message ID |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from, so calling get_message with the default account when the ID was obtained from a non-default account returns "not found". |
Parameter schema (JSON)
{
"description": "Parameters for get_message.",
"properties": {
"message_id": {
"description": "Gmail message ID",
"title": "Message Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from, so calling get_message with the default account when the ID was obtained from a non-default account returns \"not found\".",
"title": "Account"
}
},
"required": [
"message_id"
],
"title": "GetMessageParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"AttachmentMeta": {
"description": "Attachment metadata (no content).",
"properties": {
"filename": {
"default": "",
"title": "Filename",
"type": "string"
},
"mime_type": {
"default": "",
"title": "Mime Type",
"type": "string"
},
"size": {
"default": 0,
"title": "Size",
"type": "integer"
},
"attachment_id": {
"default": "",
"title": "Attachment Id",
"type": "string"
}
},
"title": "AttachmentMeta",
"type": "object"
}
},
"description": "Result of get_message with full MIME-parsed content.",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
},
"subject": {
"default": "",
"title": "Subject",
"type": "string"
},
"from": {
"default": "",
"title": "From",
"type": "string"
},
"to": {
"default": "",
"title": "To",
"type": "string"
},
"cc": {
"default": "",
"title": "Cc",
"type": "string"
},
"bcc": {
"default": "",
"title": "Bcc",
"type": "string"
},
"date": {
"default": "",
"title": "Date",
"type": "string"
},
"message_id": {
"default": "",
"description": "RFC 2822 Message-ID header",
"title": "Message Id",
"type": "string"
},
"references": {
"default": "",
"title": "References",
"type": "string"
},
"in_reply_to": {
"default": "",
"title": "In Reply To",
"type": "string"
},
"body": {
"default": "",
"title": "Body",
"type": "string"
},
"body_truncated": {
"default": false,
"title": "Body Truncated",
"type": "boolean"
},
"snippet": {
"default": "",
"title": "Snippet",
"type": "string"
},
"attachments": {
"items": {
"$ref": "#/$defs/AttachmentMeta"
},
"title": "Attachments",
"type": "array"
},
"size_estimate": {
"default": 0,
"title": "Size Estimate",
"type": "integer"
},
"body_extraction_failed": {
"default": false,
"description": "True when Gmail reported a non-trivial message but body extraction failed even after raw MIME fallback.",
"title": "Body Extraction Failed",
"type": "boolean"
}
},
"title": "GetMessageResult",
"type": "object"
} # get_thread read
Read every message in a Gmail conversation, oldest first, given a thread_id. Use when the user wants the full back-and-forth, not just one message — phrases like "show me the whole conversation", "what did we say in that thread". For finding a single message, use get_message; for finding messages by query, use search_messages.
Full description
Get all messages in a Gmail thread.
Retrieves the full conversation thread with parsed message content.
Messages are ordered chronologically (oldest first).
Parameters:
thread_id: Gmail thread ID (required)
Returns:
GetThreadResult with:
- id: Thread ID
- messages: List of messages in the thread with parsed content
- message_count: Number of messages in the thread | Parameter | Type | Required | Description |
|---|---|---|---|
thread_id | string | Yes | Gmail thread ID |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this thread_id from search_messages — thread IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for get_thread.",
"properties": {
"thread_id": {
"description": "Gmail thread ID",
"title": "Thread Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this thread_id from search_messages — thread IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"thread_id"
],
"title": "GetThreadParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"ThreadMessage": {
"description": "A message within a thread (snippet format).",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
},
"subject": {
"default": "",
"title": "Subject",
"type": "string"
},
"from": {
"default": "",
"title": "From",
"type": "string"
},
"to": {
"default": "",
"title": "To",
"type": "string"
},
"date": {
"default": "",
"title": "Date",
"type": "string"
},
"snippet": {
"default": "",
"title": "Snippet",
"type": "string"
},
"body": {
"default": "",
"title": "Body",
"type": "string"
},
"body_truncated": {
"default": false,
"title": "Body Truncated",
"type": "boolean"
},
"size_estimate": {
"default": 0,
"title": "Size Estimate",
"type": "integer"
},
"body_extraction_failed": {
"default": false,
"description": "True when Gmail reported a non-trivial message but body extraction failed even after raw MIME fallback.",
"title": "Body Extraction Failed",
"type": "boolean"
}
},
"title": "ThreadMessage",
"type": "object"
}
},
"description": "Result of get_thread.",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"messages": {
"items": {
"$ref": "#/$defs/ThreadMessage"
},
"title": "Messages",
"type": "array"
},
"message_count": {
"default": 0,
"title": "Message Count",
"type": "integer"
},
"filtered_count": {
"default": 0,
"description": "Number of messages in this thread withheld because they contained a security code (only non-zero when the filter is in 'exclude' mode).",
"title": "Filtered Count",
"type": "integer"
}
},
"title": "GetThreadResult",
"type": "object"
} # get_user_permissions read
Show which Gmail OAuth scopes the user has granted, plus their email address and mailbox totals. Use when the user asks "what Gmail access do I have", "which scopes are connected", or when a tool call has just failed with a permissions error and you need to confirm whether the required scope is present. Common scopes: gmail.modify (read+compose+send+modify), gmail.compose (drafts+send), gmail.send (send only), gmail.settings.basic (filter management).
Full description
Return the OAuth scopes and profile info for the user's Gmail connection.
Retrieves granted scopes from token exchange and calls the Gmail API
to get the user's email address and mailbox statistics.
Parameters:
None - This tool takes no parameters.
Returns:
GetUserPermissionsResult with:
- email_address: User's Gmail address
- scopes: List of granted OAuth scope URLs
- messages_total: Total messages in mailbox
- threads_total: Total threads in mailbox
Common scopes:
- gmail.modify: Read, compose, send, and modify all emails (includes read)
- gmail.compose: Create, read, update, and delete drafts; send messages
- gmail.send: Send email on behalf of the user
Errors:
ProviderError: User has not connected Gmail or token is invalid/expired | Parameter | Type | Required | Description |
|---|---|---|---|
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for get_user_permissions.",
"properties": {
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"title": "GetUserPermissionsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_user_permissions.",
"properties": {
"email_address": {
"default": "",
"description": "User's Gmail address",
"title": "Email Address",
"type": "string"
},
"scopes": {
"description": "Granted OAuth scopes",
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"messages_total": {
"default": 0,
"description": "Total messages in mailbox",
"title": "Messages Total",
"type": "integer"
},
"threads_total": {
"default": 0,
"description": "Total threads in mailbox",
"title": "Threads Total",
"type": "integer"
}
},
"title": "GetUserPermissionsResult",
"type": "object"
} # insert_message write
DEMO TOOL — inserts a fully-formed message directly into the mailbox without sending it through SMTP, allowing arbitrary From headers and backdated Date headers. The message is never delivered to anyone — it only appears in this mailbox. Use ONLY for staging realistic demo or test emails. Not for normal email composition — use send_message or create_draft for that.
Full description
Insert a message directly into the mailbox without sending it.
DEMO TOOL — for staging realistic demo or test emails in your own
mailbox. Not for normal email composition.
Constructs an RFC 2822 MIME message from the provided parameters and
inserts it into the mailbox using Gmail's messages.insert API. Unlike
send_message, the From header can be any value (arbitrary sender display)
and the message is never actually delivered — it just appears in the
mailbox. Useful for staging realistic demo emails.
Parameters:
to: Recipient email address (required)
from_header: From header value, e.g. "Kenji Yamamoto <kenji@example.com>" (required)
subject: Email subject (required)
body_text: Plain text body (optional, at least one of body_text/body_html recommended)
body_html: HTML body (optional, if both provided creates multipart/alternative)
date: RFC 2822 date string for backdating, e.g. "Tue, 10 Mar 2026 18:30:00 -0700" (optional, defaults to now)
in_reply_to: Message-ID header for threading (optional)
references: References header for threading (optional)
label_ids: Gmail label IDs to apply, e.g. ["INBOX", "UNREAD"] (optional)
headers: Additional custom headers as key-value pairs (optional)
thread_id: Gmail thread ID to insert into an existing conversation (optional).
When provided, in_reply_to and/or references MUST also be set.
Returns:
InsertMessageResult with id, thread_id, and applied label_ids | Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient email address |
from_header | string | Yes | From header value (e.g., 'Kenji Yamamoto <kenji@example.com>') |
subject | string | Yes | Email subject |
body_text | string | null | No | Plain text body |
body_html | string | null | No | HTML body |
date | string | null | No | RFC 2822 date string (defaults to now) |
in_reply_to | string | null | No | Message-ID for threading |
references | string | null | No | References header for threading |
label_ids | array<string> | null | No | Gmail label IDs to apply (e.g., ['INBOX', 'UNREAD']) |
headers | object | null | No | Additional custom headers (e.g., {'X-Toolforest-Demo': 'true'}) |
thread_id | string | null | No | Gmail thread ID to insert into an existing conversation. Requires in_reply_to and/or references to be set per RFC 2822 (Gmail API threading requirement). |
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for insert_message (demo tool for staging mailbox content).",
"properties": {
"to": {
"description": "Recipient email address",
"title": "To",
"type": "string"
},
"from_header": {
"description": "From header value (e.g., 'Kenji Yamamoto <kenji@example.com>')",
"title": "From Header",
"type": "string"
},
"subject": {
"description": "Email subject",
"title": "Subject",
"type": "string"
},
"body_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Plain text body",
"title": "Body Text"
},
"body_html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "HTML body",
"title": "Body Html"
},
"date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "RFC 2822 date string (defaults to now)",
"title": "Date"
},
"in_reply_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Message-ID for threading",
"title": "In Reply To"
},
"references": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "References header for threading",
"title": "References"
},
"label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Gmail label IDs to apply (e.g., ['INBOX', 'UNREAD'])",
"title": "Label Ids"
},
"headers": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Additional custom headers (e.g., {'X-Toolforest-Demo': 'true'})",
"title": "Headers"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Gmail thread ID to insert into an existing conversation. Requires in_reply_to and/or references to be set per RFC 2822 (Gmail API threading requirement).",
"title": "Thread Id"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"required": [
"to",
"from_header",
"subject"
],
"title": "InsertMessageParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of insert_message.",
"properties": {
"id": {
"default": "",
"description": "Gmail message resource ID",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"description": "Gmail thread ID",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"description": "Applied labels",
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
}
},
"title": "InsertMessageResult",
"type": "object"
} # list_accounts read
List the Google accounts the user has connected for Gmail. Returns each account's email, name, and whether it's the current default for this MCP client. Use when the user mentions "my work account" / "my personal account" or asks which accounts are available — then pass `account=<email>` to target a non-default account. `account=<email>` is supported on all Gmail tools.
Full description
Return the user's connected Gmail accounts for the current MCP client.
Returns:
ListAccountsResult with one entry per connected Google account, including the
account's email, display name (when available), and a boolean flag indicating
which account is the current default for this user + MCP client.
When the user has multiple Google accounts connected, this tool is the canonical
way to discover what's available before invoking other Gmail tools with an
explicit `account=...` override. No parameters.
Parameter schema (JSON)
{
"description": "Parameters for list_accounts.",
"properties": {},
"title": "ListAccountsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"ConnectedAccount": {
"description": "A single connected Google account.",
"properties": {
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"is_default": {
"default": false,
"title": "Is Default",
"type": "boolean"
}
},
"title": "ConnectedAccount",
"type": "object"
}
},
"description": "Result of list_accounts.",
"properties": {
"accounts": {
"items": {
"$ref": "#/$defs/ConnectedAccount"
},
"title": "Accounts",
"type": "array"
}
},
"title": "ListAccountsResult",
"type": "object"
} # list_drafts read
List the user's existing drafts — messages composed but not yet sent. Use when the user asks "what drafts do I have", "show me my drafts", or wants to find a specific draft to send or edit. Returns subject lines and recipients; to read a draft's body, follow up with get_message using the draft's message ID.
Full description
List draft messages in the user's mailbox.
Parameters:
max_results: Maximum drafts to return (1-50, default 10)
page_token: Pagination token for next page
Returns:
ListDraftsResult with:
- drafts: List of draft summaries with subject and recipients
- result_count: Number of drafts returned
- next_page_token: Token for next page (if more drafts exist) | Parameter | Type | Required | Description |
|---|---|---|---|
max_results | integer | No | Maximum number of drafts (1-50) Default: 10 |
page_token | string | null | No | Token for next page |
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for list_drafts.",
"properties": {
"max_results": {
"default": 10,
"description": "Maximum number of drafts (1-50)",
"maximum": 50,
"minimum": 1,
"title": "Max Results",
"type": "integer"
},
"page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Token for next page",
"title": "Page Token"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"title": "ListDraftsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"DraftSummary": {
"description": "Summary of a draft message.",
"properties": {
"draft_id": {
"default": "",
"title": "Draft Id",
"type": "string"
},
"id": {
"default": "",
"description": "Gmail message resource ID of the draft message",
"title": "Id",
"type": "string"
},
"subject": {
"default": "",
"title": "Subject",
"type": "string"
},
"to": {
"default": "",
"title": "To",
"type": "string"
},
"snippet": {
"default": "",
"title": "Snippet",
"type": "string"
}
},
"title": "DraftSummary",
"type": "object"
}
},
"description": "Result of list_drafts.",
"properties": {
"drafts": {
"items": {
"$ref": "#/$defs/DraftSummary"
},
"title": "Drafts",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Next Page Token"
}
},
"title": "ListDraftsResult",
"type": "object"
} # list_filters read
List every email filter the user has set up — the auto-rules that label, archive, forward, or delete incoming mail. Use when the user asks "what filters do I have", "show my Gmail rules", or wants to review or audit their auto-processing setup. Returns filter IDs needed for get_filter and delete_filter. Requires the gmail.settings.basic OAuth scope.
Full description
List all email filters configured in the user's Gmail account.
Returns all filters with their matching criteria and actions.
Requires the gmail.settings.basic scope.
Parameters:
None - This tool takes no parameters.
Returns:
ListFiltersResult with:
- filters: List of filters with id, criteria, and action | Parameter | Type | Required | Description |
|---|---|---|---|
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for list_filters.",
"properties": {
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"title": "ListFiltersParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"FilterAction": {
"description": "Filter actions to apply on matching messages.",
"properties": {
"add_label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to add (use 'STARRED' to star)",
"title": "Add Label Ids"
},
"remove_label_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to remove",
"title": "Remove Label Ids"
}
},
"title": "FilterAction",
"type": "object"
},
"FilterCriteria": {
"description": "Filter matching criteria.",
"properties": {
"from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match sender address",
"title": "From"
},
"to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match recipient address",
"title": "To"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Match subject line",
"title": "Subject"
},
"query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Gmail search query for matching",
"title": "Query"
},
"negated_query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Exclude messages matching this query",
"title": "Negated Query"
},
"has_attachment": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Match messages with attachments",
"title": "Has Attachment"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Message size threshold in bytes",
"title": "Size"
},
"size_comparison": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Size comparison: 'larger' or 'smaller'",
"title": "Size Comparison"
}
},
"title": "FilterCriteria",
"type": "object"
},
"FilterInfo": {
"description": "Full filter representation.",
"properties": {
"id": {
"default": "",
"description": "Filter ID",
"title": "Id",
"type": "string"
},
"criteria": {
"anyOf": [
{
"$ref": "#/$defs/FilterCriteria"
},
{
"type": "null"
}
],
"default": null
},
"action": {
"anyOf": [
{
"$ref": "#/$defs/FilterAction"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "FilterInfo",
"type": "object"
}
},
"description": "Result of list_filters.",
"properties": {
"filters": {
"items": {
"$ref": "#/$defs/FilterInfo"
},
"title": "Filters",
"type": "array"
}
},
"title": "ListFiltersResult",
"type": "object"
} # list_labels read
List every label in the user's mailbox — both system labels (INBOX, SENT, TRASH, STARRED, UNREAD, IMPORTANT, etc.) and user-created custom labels. Use to find a label's ID before calling modify_message, batch_modify_messages, or create_filter, since those tools take label IDs (not names). Also use when the user asks "what labels do I have".
Full description
List all labels in the user's mailbox.
Returns both system labels (INBOX, SENT, TRASH, etc.) and user-created labels.
Parameters:
None - This tool takes no parameters.
Returns:
ListLabelsResult with:
- labels: List of label info with id, name, and type | Parameter | Type | Required | Description |
|---|---|---|---|
account | string | null | No | Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for list_labels.",
"properties": {
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"title": "ListLabelsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"LabelInfo": {
"description": "Gmail label information.",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"type": {
"default": "",
"description": "'system' or 'user'",
"title": "Type",
"type": "string"
},
"message_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Count"
},
"threads_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Threads Count"
}
},
"title": "LabelInfo",
"type": "object"
}
},
"description": "Result of list_labels.",
"properties": {
"labels": {
"items": {
"$ref": "#/$defs/LabelInfo"
},
"title": "Labels",
"type": "array"
}
},
"title": "ListLabelsResult",
"type": "object"
} # modify_message write
Apply or remove labels on a single email — used to mark as read/unread, archive, star, unstar, trash, or untrash. Use when the user says "mark as read", "archive that email", "star it", "move to trash", "unarchive", or "add the X label". Common patterns: mark read = remove UNREAD, archive = remove INBOX, star = add STARRED, trash = add TRASH. For many messages at once, use batch_modify_messages.
Full description
Modify labels on a Gmail message.
Add or remove labels to organize messages. Common operations:
- Mark as read: remove_labels=["UNREAD"]
- Archive: remove_labels=["INBOX"]
- Star: add_labels=["STARRED"]
- Unstar: remove_labels=["STARRED"]
- Trash: add_labels=["TRASH"]
- Move to inbox: add_labels=["INBOX"]
Parameters:
message_id: Gmail message ID (required)
add_labels: List of label IDs to add (optional)
remove_labels: List of label IDs to remove (optional)
Returns:
ModifyMessageResult with the updated message's labels | Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | Gmail message ID to modify |
add_labels | array<string> | null | No | Label IDs to add |
remove_labels | array<string> | null | No | Label IDs to remove |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for modify_message.\n\nCommon patterns:\n - Mark as read: remove_labels=[\"UNREAD\"]\n - Archive: remove_labels=[\"INBOX\"]\n - Star: add_labels=[\"STARRED\"]\n - Trash: add_labels=[\"TRASH\"]",
"properties": {
"message_id": {
"description": "Gmail message ID to modify",
"title": "Message Id",
"type": "string"
},
"add_labels": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to add",
"title": "Add Labels"
},
"remove_labels": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Label IDs to remove",
"title": "Remove Labels"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"message_id"
],
"title": "ModifyMessageParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of modify_message.",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
}
},
"title": "ModifyMessageResult",
"type": "object"
} # reply_to_message write
Send a reply to an existing email — delivered immediately and threaded under the original conversation. Use when the user says "reply to…", "respond to…", "write back to…", or "send a reply" and does NOT want to review first. Set reply_all=true to include all original recipients. Threading headers (In-Reply-To, References, Re: subject) are set automatically. For a draft reply the user can review before sending, use reply_to_message_as_draft. Supports file attachments.
Full description
Reply to an existing Gmail message with proper threading, optionally with attachments.
Fetches the original message to extract threading headers (Message-ID,
References, threadId) and constructs a properly threaded reply. Supports
both reply (to sender only) and reply-all.
Parameters:
message_id: ID of the message to reply to (required)
body: Reply body text (required)
reply_all: Whether to reply to all recipients (default false)
attachments: List of file attachments (optional). Each item is an object with:
- filename: Name for the file (e.g. "report.pdf")
- mime_type: MIME type (e.g. "application/pdf", "image/png")
- data: Base64-encoded file content. Max 3 MB per attachment after decoding.
Returns:
ReplyToMessageResult with the reply message's ID
Threading details (handled automatically):
- In-Reply-To is set to the original message's Message-ID
- References chain is maintained for proper threading
- threadId is preserved for Gmail conversation grouping
- Subject is prefixed with 'Re:' if not already present | Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | ID of the message to reply to |
body | string | Yes | Reply body text |
reply_all | boolean | No | Reply to all recipients Default: false |
attachments | array<AttachmentInput> | null | No | List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding. |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. The reply is also sent FROM this account. |
Parameter schema (JSON)
{
"$defs": {
"AttachmentInput": {
"description": "An attachment to include with an outbound message. Max 3 MB per attachment.",
"properties": {
"filename": {
"description": "Filename for the attachment (e.g., 'report.pdf')",
"title": "Filename",
"type": "string"
},
"mime_type": {
"description": "MIME type (e.g., 'application/pdf', 'image/png')",
"title": "Mime Type",
"type": "string"
},
"data": {
"description": "Base64-encoded attachment content. Max 3 MB per attachment after decoding.",
"title": "Data",
"type": "string"
}
},
"required": [
"filename",
"mime_type",
"data"
],
"title": "AttachmentInput",
"type": "object",
"additionalProperties": false
}
},
"description": "Parameters for reply_to_message.",
"properties": {
"message_id": {
"description": "ID of the message to reply to",
"title": "Message Id",
"type": "string"
},
"body": {
"description": "Reply body text",
"title": "Body",
"type": "string"
},
"reply_all": {
"default": false,
"description": "Reply to all recipients",
"title": "Reply All",
"type": "boolean"
},
"attachments": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AttachmentInput"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding.",
"title": "Attachments"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. The reply is also sent FROM this account.",
"title": "Account"
}
},
"required": [
"message_id",
"body"
],
"title": "ReplyToMessageParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of reply_to_message.",
"properties": {
"id": {
"default": "",
"description": "ID of the reply message",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
}
},
"title": "ReplyToMessageResult",
"type": "object"
} # reply_to_message_as_draft write
Draft a reply to an existing email — saved to Drafts and threaded under the original conversation, ready for the user to review before sending. Use when the user says "draft a reply", "write back as draft", "reply but don't send", or wants to review the wording first. Threading headers (In-Reply-To, References, Re: subject) are set automatically from the original message. Differs from create_draft (standalone, no threading) and reply_to_message (sends immediately). Set reply_all=true to include all original recipients. Supports file attachments.
Full description
Create a draft reply to an existing Gmail message with proper threading.
Fetches the original message to extract threading headers (Message-ID,
References, threadId) and constructs a properly threaded reply draft.
The draft appears in Gmail Drafts attached to the correct conversation
thread, ready for editing and sending.
Parameters:
message_id: ID of the message to reply to (required)
body: Reply body text (required)
reply_all: Whether to reply to all recipients (default false)
attachments: List of file attachments (optional). Each item is an object with:
- filename: Name for the file (e.g. "report.pdf")
- mime_type: MIME type (e.g. "application/pdf", "image/png")
- data: Base64-encoded file content. Max 3 MB per attachment after decoding.
Returns:
ReplyToMessageAsDraftResult with the draft's ID
Threading details (handled automatically):
- In-Reply-To is set to the original message's Message-ID
- References chain is maintained for proper threading
- threadId is preserved for Gmail conversation grouping
- Subject is prefixed with 'Re:' if not already present | Parameter | Type | Required | Description |
|---|---|---|---|
message_id | string | Yes | ID of the message to reply to |
body | string | Yes | Reply body text |
reply_all | boolean | No | Reply to all recipients Default: false |
attachments | array<AttachmentInput> | null | No | List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding. |
account | string | null | No | Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. The draft is also created in this account. |
Parameter schema (JSON)
{
"$defs": {
"AttachmentInput": {
"description": "An attachment to include with an outbound message. Max 3 MB per attachment.",
"properties": {
"filename": {
"description": "Filename for the attachment (e.g., 'report.pdf')",
"title": "Filename",
"type": "string"
},
"mime_type": {
"description": "MIME type (e.g., 'application/pdf', 'image/png')",
"title": "Mime Type",
"type": "string"
},
"data": {
"description": "Base64-encoded attachment content. Max 3 MB per attachment after decoding.",
"title": "Data",
"type": "string"
}
},
"required": [
"filename",
"mime_type",
"data"
],
"title": "AttachmentInput",
"type": "object",
"additionalProperties": false
}
},
"description": "Parameters for reply_to_message_as_draft.",
"properties": {
"message_id": {
"description": "ID of the message to reply to",
"title": "Message Id",
"type": "string"
},
"body": {
"description": "Reply body text",
"title": "Body",
"type": "string"
},
"reply_all": {
"default": false,
"description": "Reply to all recipients",
"title": "Reply All",
"type": "boolean"
},
"attachments": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AttachmentInput"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding.",
"title": "Attachments"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account used to fetch this message_id from search_messages — message IDs are scoped to the mailbox they came from. The draft is also created in this account.",
"title": "Account"
}
},
"required": [
"message_id",
"body"
],
"title": "ReplyToMessageAsDraftParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of reply_to_message_as_draft.",
"properties": {
"draft_id": {
"default": "",
"description": "ID of the created draft",
"title": "Draft Id",
"type": "string"
}
},
"title": "ReplyToMessageAsDraftResult",
"type": "object"
} # search_messages read
Find emails using Gmail search syntax (from:, to:, subject:, has:attachment, after:, before:, label:, is:unread, etc.). Use when the user wants to locate, look up, find, or search for an email by sender, recipient, date, label, or keyword. Returns individual messages with headers and snippets; pass include_body=true to get body text inline. For an entire conversation when you have a thread_id, use get_thread.
Full description
Search Gmail messages using Gmail search syntax.
This is the primary tool for finding emails. Supports the full Gmail
search query language including operators like from:, to:, subject:,
has:attachment, is:unread, after:, before:, label:, etc.
Parameters:
query: Gmail search query string (required)
max_results (int, optional): Maximum number of messages to return (1-500).
Defaults to 10 for lightweight queries. Set higher when bulk retrieval
or comprehensive search is needed. Note: large values combined with
include_body=True can result in large payloads.
page_token: Pagination token for next page
include_body: Whether to include message body text (default false)
Returns:
SearchMessagesResult with:
- messages: List of matching messages with headers and snippets
- result_count: Number of messages returned
- next_page_token: Token for fetching next page (if more results exist)
- estimated_total: Estimated total matching messages
Examples:
- "from:boss@company.com is:unread" -- unread emails from boss
- "subject:invoice after:2024/01/01" -- invoices from 2024
- "has:attachment filename:pdf" -- emails with PDF attachments
- "in:sent to:client@example.com" -- sent emails to a client | Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Gmail search query (e.g., 'from:user@example.com subject:invoice') |
max_results | integer | No | Maximum number of results (1-500) Default: 10 |
page_token | string | null | No | Token for next page of results |
include_body | boolean | No | Include message body text in results Default: false |
account | string | null | No | Optional Gmail account override (email, e.g. "alice.work@company.com"). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"description": "Parameters for search_messages.",
"properties": {
"query": {
"description": "Gmail search query (e.g., 'from:user@example.com subject:invoice')",
"title": "Query",
"type": "string"
},
"max_results": {
"default": 10,
"description": "Maximum number of results (1-500)",
"maximum": 500,
"minimum": 1,
"title": "Max Results",
"type": "integer"
},
"page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Token for next page of results",
"title": "Page Token"
},
"include_body": {
"default": false,
"description": "Include message body text in results",
"title": "Include Body",
"type": "boolean"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email, e.g. \"alice.work@company.com\"). Omit to use the user's default Gmail account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"required": [
"query"
],
"title": "SearchMessagesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"SearchMessageResult": {
"description": "A single search result message.",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
},
"subject": {
"default": "",
"title": "Subject",
"type": "string"
},
"from": {
"default": "",
"title": "From",
"type": "string"
},
"to": {
"default": "",
"title": "To",
"type": "string"
},
"date": {
"default": "",
"title": "Date",
"type": "string"
},
"snippet": {
"default": "",
"title": "Snippet",
"type": "string"
},
"size_estimate": {
"default": 0,
"title": "Size Estimate",
"type": "integer"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
},
"body_truncated": {
"default": false,
"title": "Body Truncated",
"type": "boolean"
},
"body_extraction_failed": {
"default": false,
"description": "True when Gmail reported a non-trivial message but body extraction failed even after raw MIME fallback.",
"title": "Body Extraction Failed",
"type": "boolean"
}
},
"title": "SearchMessageResult",
"type": "object"
}
},
"description": "Result of search_messages.",
"properties": {
"messages": {
"items": {
"$ref": "#/$defs/SearchMessageResult"
},
"title": "Messages",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Next Page Token"
},
"estimated_total": {
"default": 0,
"title": "Estimated Total",
"type": "integer"
},
"filtered_count": {
"default": 0,
"description": "Number of messages withheld from this page because they contained a security code (only non-zero when the security code filter is in 'exclude' mode). result_count counts the messages actually returned.",
"title": "Filtered Count",
"type": "integer"
}
},
"title": "SearchMessagesResult",
"type": "object"
} # send_draft write
Send a previously composed draft, given a draft_id. Use when the user has reviewed a draft and says "send it", "send the draft", or "go ahead". The draft is removed from Drafts on success. Pairs with create_draft and reply_to_message_as_draft, which both return the draft_id this tool needs.
Full description
Send an existing draft message.
Sends a previously created draft. The draft is removed from the
drafts list after sending.
Parameters:
draft_id: ID of the draft to send (required)
Returns:
SendDraftResult with the sent message's ID | Parameter | Type | Required | Description |
|---|---|---|---|
draft_id | string | Yes | ID of the draft to send |
account | string | null | No | Optional Gmail account override (email). Pass the same account the draft was created in — draft IDs are scoped to the mailbox they came from. |
Parameter schema (JSON)
{
"description": "Parameters for send_draft.",
"properties": {
"draft_id": {
"description": "ID of the draft to send",
"title": "Draft Id",
"type": "string"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account override (email). Pass the same account the draft was created in — draft IDs are scoped to the mailbox they came from.",
"title": "Account"
}
},
"required": [
"draft_id"
],
"title": "SendDraftParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of send_draft.",
"properties": {
"id": {
"default": "",
"description": "ID of the sent message",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
}
},
"title": "SendDraftResult",
"type": "object"
} # send_message write
Send a brand-new email immediately — composes and delivers in one shot. Use when the user says "send an email to…", "email so-and-so about…", or wants a fresh standalone message delivered now. NOT for replies — use reply_to_message to keep proper threading. Supports cc, bcc, and file attachments.
Full description
Send a new email message, optionally with file attachments.
Composes and sends a plain text email. For replies, use reply_to_message
instead to maintain proper threading.
Parameters:
to: Recipient email address(es), comma-separated (required)
subject: Email subject line (required)
body: Email body text in plain text (required)
cc: CC recipients, comma-separated (optional)
bcc: BCC recipients, comma-separated (optional)
attachments: List of file attachments (optional). Each item is an object with:
- filename: Name for the file (e.g. "report.pdf")
- mime_type: MIME type (e.g. "application/pdf", "image/png")
- data: Base64-encoded file content. Max 3 MB per attachment after decoding.
Returns:
SendMessageResult with the sent message's ID and labels | Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient email address(es), comma-separated |
subject | string | Yes | Email subject line |
body | string | Yes | Email body text (plain text) |
cc | string | null | No | CC recipients, comma-separated |
bcc | string | null | No | BCC recipients, comma-separated |
attachments | array<AttachmentInput> | null | No | List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding. |
account | string | null | No | Optional Gmail account to send FROM (email). Omit to send from the user's default account. Call list_accounts to see which accounts are connected. |
Parameter schema (JSON)
{
"$defs": {
"AttachmentInput": {
"description": "An attachment to include with an outbound message. Max 3 MB per attachment.",
"properties": {
"filename": {
"description": "Filename for the attachment (e.g., 'report.pdf')",
"title": "Filename",
"type": "string"
},
"mime_type": {
"description": "MIME type (e.g., 'application/pdf', 'image/png')",
"title": "Mime Type",
"type": "string"
},
"data": {
"description": "Base64-encoded attachment content. Max 3 MB per attachment after decoding.",
"title": "Data",
"type": "string"
}
},
"required": [
"filename",
"mime_type",
"data"
],
"title": "AttachmentInput",
"type": "object",
"additionalProperties": false
}
},
"description": "Parameters for send_message.",
"properties": {
"to": {
"description": "Recipient email address(es), comma-separated",
"title": "To",
"type": "string"
},
"subject": {
"description": "Email subject line",
"title": "Subject",
"type": "string"
},
"body": {
"description": "Email body text (plain text)",
"title": "Body",
"type": "string"
},
"cc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CC recipients, comma-separated",
"title": "Cc"
},
"bcc": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "BCC recipients, comma-separated",
"title": "Bcc"
},
"attachments": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AttachmentInput"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of file attachments. Each item must have: 'filename' (e.g. 'report.pdf'), 'mime_type' (e.g. 'application/pdf'), and 'data' (base64-encoded file content). Max 3 MB per attachment after decoding.",
"title": "Attachments"
},
"account": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional Gmail account to send FROM (email). Omit to send from the user's default account. Call list_accounts to see which accounts are connected.",
"title": "Account"
}
},
"required": [
"to",
"subject",
"body"
],
"title": "SendMessageParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of send_message.",
"properties": {
"id": {
"default": "",
"description": "ID of the sent message",
"title": "Id",
"type": "string"
},
"thread_id": {
"default": "",
"title": "Thread Id",
"type": "string"
},
"label_ids": {
"items": {
"type": "string"
},
"title": "Label Ids",
"type": "array"
}
},
"title": "SendMessageResult",
"type": "object"
}