This is an MCP server provided by Gmail API. The server provides tools for developers to build LLM applications on top of Gmail.
Discoverability
0/6 passed0 of 6 passed0/100
Client listings and public setup information.
MCP Server Card
An MCP Server Card found through ai-catalog.json or the endpoint's /server-card that declares this endpoint passes. Earlier paths and mcp.json earn half credit.
No matching manifest was found at /mcp.json or /.well-known/mcp.json.
The title clearly communicates the tool’s action and subject. Keep it concise.
Description94/100
Creates a new draft email in the authenticated user's Gmail account.
This tool takes recipient addresses (`to`, `cc`, `bcc`), a `subject`, and body content as inputs. Plain text body content can be provided in `body` (do NOT format `body` with Markdown), and rich-text HTML content can be provided in `htmlBody` (use valid HTML tags for formatting; if both are provided, `body` serves as the plain-text alternative). If the draft is created as a reply to an existing message, the ID of the original message should be passed to the tool in the `replyToMessageId` field. Set `includeSignature` to true to append the user's configured Gmail web signature to the draft.
Returns a Draft object with the `id`, `threadId`, and `viewUrl` fields populated.
The description explains the capability, when to use it, and what to expect.
Inputs80/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
$defs › Attachment › content
Required. The base64-encoded content of the attachment.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
$defs › Attachment › filename
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.
Clear enough to supply this argument.
$defs › Attachment › id
Optional. Output only. When present, contains the ID of an external attachment that can be retrieved in a separate `GetMessageAttachment` request.
Clear enough to supply this argument.
$defs › Attachment › inline
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 `` to `html_body`, where `` is the attachment's zero-based position in `attachments`, counting all attachments. For example, if `attachments` contains a PDF followed by an inline PNG, use `` for the PNG. Don't reference inline attachments by `filename`. Other images in `html_body` are removed. If `false` or absent, defaults to `false`, and it's treated as a regular attachment.
Clear enough to supply this argument.
$defs › Attachment › mimeType
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".
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
bcc
Optional. The blind carbon copy recipients of the email draft. Each string MUST be a valid plain email address (e.g., "[email protected]").
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
body
Optional. The plain text body content of the email draft. Do NOT format this field with Markdown (such as headers `#`, bold `**`, bullet points `*`, or tables `|`). If formatted rich text is desired, use `html_body` instead. If `html_body` is also provided, this field is treated as the plain-text alternative.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
cc
Optional. The carbon copy recipients of the email draft. Each string MUST be a valid plain email address (e.g., "[email protected]").
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
htmlBody
Optional. The HTML content of the email draft. If provided, this will be used as the rich-text version of the email. Use this field (with valid HTML tags such as ` `, `
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
includeSignature
Optional. Whether to append the user's configured Gmail web signature to the draft. Defaults to false.
Clear enough to supply this argument.
replyToMessageId
Optional. The ID of the message to reply to. If provided, this will be used as the reply-to message ID for the email draft, and the `body` and `html_body` will be appended to the original message body.
Clear enough to supply this argument.
subject
Optional. The subject line of the email. Defaults to empty if not provided.
Clear enough to supply this argument.
to
Optional. The primary recipients of the email draft. Each string MUST be a valid plain email address (e.g., "[email protected]").
Align the output schema with the tool’s documented result.
View output schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the draft resource."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the draft in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The subject line of the draft message."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the draft in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML body content of the draft, if available."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The ids of the labels attached to the draft message."
},
"threadId": {
"type": "string",
"description": "The ID of the thread this draft belongs to."
},
"messageId": {
"type": "string",
"description": "The ID of the message associated with this draft."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Cc' recipient email addresses extracted from headers."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'To' recipient email addresses extracted from headers."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Bcc' recipient email addresses extracted from headers."
},
"plaintextBody": {
"type": "string",
"description": "Plain text body content, if available."
}
},
"description": "Details of a draft."
}
Original tool metadata
{
"name": "create_draft",
"description": "Creates a new draft email in the authenticated user's Gmail account.\n\nThis tool takes recipient addresses (`to`, `cc`, `bcc`), a `subject`, and body content as inputs. Plain text body content can be provided in `body` (do NOT format `body` with Markdown), and rich-text HTML content can be provided in `htmlBody` (use valid HTML tags for formatting; if both are provided, `body` serves as the plain-text alternative). If the draft is created as a reply to an existing message, the ID of the original message should be passed to the tool in the `replyToMessageId` field. Set `includeSignature` to true to append the user's configured Gmail web signature to the draft.\n\nReturns a Draft object with the `id`, `threadId`, and `viewUrl` fields populated.\n",
"inputSchema": {
"type": "object",
"$defs": {
"Attachment": {
"type": "object",
"required": [
"content"
],
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. When present, contains the ID of an external attachment that can be retrieved in a separate `GetMessageAttachment` request."
},
"inline": {
"type": "boolean",
"description": "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 `` to `html_body`, where `` is the attachment's zero-based position in `attachments`, counting all attachments. For example, if `attachments` contains a PDF followed by an inline PNG, use `` for the PNG. Don't reference inline attachments by `filename`. Other images in `html_body` are removed. If `false` or absent, defaults to `false`, and it's treated as a regular attachment."
},
"content": {
"type": "string",
"format": "byte",
"description": "Required. The base64-encoded content of the attachment."
},
"filename": {
"type": "string",
"description": "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": {
"type": "string",
"description": "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\"."
}
},
"description": "Represents an attachment to be included in an email."
}
},
"properties": {
"cc": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The carbon copy recipients of the email draft. Each string MUST be a valid plain email address (e.g., \"[email protected]\")."
},
"to": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The primary recipients of the email draft. Each string MUST be a valid plain email address (e.g., \"[email protected]\")."
},
"bcc": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The blind carbon copy recipients of the email draft. Each string MUST be a valid plain email address (e.g., \"[email protected]\")."
},
"body": {
"type": "string",
"description": "Optional. The plain text body content of the email draft. Do NOT format this field with Markdown (such as headers `#`, bold `**`, bullet points `*`, or tables `|`). If formatted rich text is desired, use `html_body` instead. If `html_body` is also provided, this field is treated as the plain-text alternative."
},
"subject": {
"type": "string",
"description": "Optional. The subject line of the email. Defaults to empty if not provided."
},
"htmlBody": {
"type": "string",
"description": "Optional. The HTML content of the email draft. If provided, this will be used as the rich-text version of the email. Use this field (with valid HTML tags such as ` `, ` "
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/Attachment"
},
"description": "Optional. The attachments to include in the email. The combined size of attachments in the message cannot exceed 25MB. If you need to send files larger than 25MB, upload the file to Drive first and then insert the Drive link into `body` or `html_body`."
},
"includeSignature": {
"type": "boolean",
"description": "Optional. Whether to append the user's configured Gmail web signature to the draft. Defaults to false."
},
"replyToMessageId": {
"type": "string",
"description": "Optional. The ID of the message to reply to. If provided, this will be used as the reply-to message ID for the email draft, and the `body` and `html_body` will be appended to the original message body."
}
},
"description": "Request message for CreateDraft RPC."
},
"outputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the draft resource."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the draft in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The subject line of the draft message."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the draft in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML body content of the draft, if available."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The ids of the labels attached to the draft message."
},
"threadId": {
"type": "string",
"description": "The ID of the thread this draft belongs to."
},
"messageId": {
"type": "string",
"description": "The ID of the message associated with this draft."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Cc' recipient email addresses extracted from headers."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'To' recipient email addresses extracted from headers."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Bcc' recipient email addresses extracted from headers."
},
"plaintextBody": {
"type": "string",
"description": "Plain text body content, if available."
}
},
"description": "Details of a draft."
},
"annotations": {
"title": "Create draft email",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description85/100
Lists draft emails from the authenticated user's Gmail account, optionally filtered by a query string.
Note: An empty JSON object `{}` represents zero matching items, not an error.
The description explains the capability, when to use it, and what to expect.
Inputs81/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageSize
Optional. The maximum number of drafts to return. If unspecified, defaults to 20. The maximum allowed value is 50.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageToken
Optional. A token received from a previous `list_drafts` call to retrieve the next page of results. Leave empty to fetch the first page. This is primarily used for pagination to continue fetching results from where the previous `ListDraft` call left off, especially when the number of drafts matching the query exceeds the `page_size` limit.
Clear enough to supply this argument.
query
Optional. A query string to filter the drafts. Natural language queries must be pre-converted into Gmail compatible syntax queries to use this tool. If omitted, all drafts (excluding spam and trash by default) are listed. The tool inherently only searches for drafts. Supported Operators by Category: Sender & Recipient: - `from:` — Sent from a specific person. - `to:` — Sent to a specific person. - `cc:` — Specific people in Cc. - `bcc:` — Specific people in Bcc. - `deliveredto:` — Delivered to a specific address. - `list:` — From a specific mailing list. Time & Date: - `after:YYYY/MM/DD` / `newer:YYYY/MM/DD` — Received after a date (evaluates against midnight 00:00:00 of that day, inclusive). - `before:YYYY/MM/DD` / `older:YYYY/MM/DD` — Received before a date (evaluates against midnight 00:00:00 of that day, exclusive; excludes that day). To search through a specific day D (or for a single day D), set `before:` to the day after (for example, `after:2026/02/01 before:2026/02/02` for Feb 1, or `after:2026/02/01 before:2026/02/06` for Feb 1–5). - `older_than:` — Older than a duration (for example, `1y`, `2d`). - `newer_than:` — Newer than a duration. Content: - `subject:` — Words in the subject line. - `has:` — Has specific content types (attachment, drive, youtube, document). - `filename:` — Attachment with a specific name or type. - `""` — Search for an exact word or phrase. (for example, `"holiday"`, `"holiday vacation"`). - `+` — Match a word exactly. (for example, `+holiday`, `+unicorn`) - `rfc822msgid:` — Specific message ID header. - `AROUND ` — Find words near each other (for example, `holiday AROUND 10 vacation`). Labels & Categories: - `label:` — Under a specific label, matched by its display name (the `name` from `list_labels`), for example `label:wins`. Label IDs such as `Label_123` match nothing. Quote a name that contains spaces (`label:"Board Prep"`) or replace its spaces and `/` with `-` (`label:board-prep`). - `category:` — In a category (primary, social, promotions, updates, forums, reservations, purchases). - `in:` — Search in specific labels (archive, snoozed, trash, sent, inbox, important, starred). For example, `in:trash`, `in:inbox`. Note: Drafts, archived, and sent messages are included by default; use `-in:draft`, `-in:archive`, and `-in:sent` to exclude them. Use `in:inbox` to restrict search to the inbox only. - `has:userlabels` — Has any user labels. - `has:nouserlabels` — Does not have any user labels. - `has:*-star` — Specific star colors (if enabled, for example, `has:yellow-star`). Status: - `is:` — Search by status (important, starred, unread, read, muted). Size: - `size:` — Specific size in bytes. - `larger:` / `smaller:` — Larger or smaller than a size (for example, `10M` for 10 MB). Logic & Grouping: - `AND` — Match all criteria (default behavior). - `OR` or `{ }` — Match one or more criteria (for example, `from:amy OR from:david`, `{from:amy from:david}`). - `-` (minus) — Exclude criteria (for example, `-movie`). - `( )` — Group multiple search terms (for example, `subject:(dinner film)`). Examples: - `subject:OneMCP Update` - `from:[email protected]` - `to:[email protected] AND newer_than:7d` - `project proposal has:attachment` - `is:unread` A space or a dash (`-`) separates numbers, while a dot (`.`) is treated as a decimal. For example, `01.2047-100` is considered two numbers: `01.2047` and `100`. To search for hyphenated or dotted identifiers (such as order numbers, tracking IDs, or invoice codes like `INV-12345`), enclose them in double quotes (e.g., `"INV-12345"` or `"01.2047-100"`) so the dash is not interpreted as a negation operator and exact phrase matching is preserved. Note: If we want to ensure all drafts for the query are returned, we can paginate the results by making repeated calls to the tool until the response contains an empty list of drafts.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
view
Optional. Controls the fields populated for drafts in the draft list. Defaults to returning metadata only (`id`, `thread_id`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`). Set to `DRAFT_VIEW_FULL` to include `subject` and `plaintext_body` content.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
{
"type": "object",
"$defs": {
"Draft": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the draft resource."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the draft in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The subject line of the draft message."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the draft in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML body content of the draft, if available."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The ids of the labels attached to the draft message."
},
"threadId": {
"type": "string",
"description": "The ID of the thread this draft belongs to."
},
"messageId": {
"type": "string",
"description": "The ID of the message associated with this draft."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Cc' recipient email addresses extracted from headers."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'To' recipient email addresses extracted from headers."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Bcc' recipient email addresses extracted from headers."
},
"plaintextBody": {
"type": "string",
"description": "Plain text body content, if available."
}
},
"description": "Details of a draft."
}
},
"properties": {
"drafts": {
"type": "array",
"items": {
"$ref": "#/$defs/Draft"
},
"description": "List of drafts."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used in a subsequent call to retrieve the next page of drafts. If the number of drafts matching the query exceeds the `page_size` limit, the response will contain a `next_page_token`. To retrieve the next page of results, pass this token in the `page_token` field of the next `ListDraftsRequest`."
}
},
"description": "Response message for ListDrafts RPC."
}
Original tool metadata
{
"name": "list_drafts",
"description": "Lists draft emails from the authenticated user's Gmail account, optionally filtered by a query string.\n\nNote: An empty JSON object `{}` represents zero matching items, not an error.\n",
"inputSchema": {
"type": "object",
"properties": {
"view": {
"enum": [
"DRAFT_VIEW_UNSPECIFIED",
"DRAFT_VIEW_METADATA_ONLY",
"DRAFT_VIEW_FULL"
],
"type": "string",
"description": "Optional. Controls the fields populated for drafts in the draft list. Defaults to returning metadata only (`id`, `thread_id`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`). Set to `DRAFT_VIEW_FULL` to include `subject` and `plaintext_body` content.",
"x-google-enum-descriptions": [
"Unspecified view. Defaults to DRAFT_VIEW_METADATA_ONLY.",
"Returns metadata only (`id`, `thread_id`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`) (if applicable); omits `subject` and `plaintext_body` content.",
"Returns full draft content, including `subject` and `plaintext_body` in addition to draft metadata (if applicable)."
]
},
"query": {
"type": "string",
"description": "Optional. A query string to filter the drafts. Natural language queries must be pre-converted into Gmail compatible syntax queries to use this tool. If omitted, all drafts (excluding spam and trash by default) are listed. The tool inherently only searches for drafts. Supported Operators by Category: Sender & Recipient: - `from:` — Sent from a specific person. - `to:` — Sent to a specific person. - `cc:` — Specific people in Cc. - `bcc:` — Specific people in Bcc. - `deliveredto:` — Delivered to a specific address. - `list:` — From a specific mailing list. Time & Date: - `after:YYYY/MM/DD` / `newer:YYYY/MM/DD` — Received after a date (evaluates against midnight 00:00:00 of that day, inclusive). - `before:YYYY/MM/DD` / `older:YYYY/MM/DD` — Received before a date (evaluates against midnight 00:00:00 of that day, exclusive; excludes that day). To search through a specific day D (or for a single day D), set `before:` to the day after (for example, `after:2026/02/01 before:2026/02/02` for Feb 1, or `after:2026/02/01 before:2026/02/06` for Feb 1–5). - `older_than:` — Older than a duration (for example, `1y`, `2d`). - `newer_than:` — Newer than a duration. Content: - `subject:` — Words in the subject line. - `has:` — Has specific content types (attachment, drive, youtube, document). - `filename:` — Attachment with a specific name or type. - `\"\"` — Search for an exact word or phrase. (for example, `\"holiday\"`, `\"holiday vacation\"`). - `+` — Match a word exactly. (for example, `+holiday`, `+unicorn`) - `rfc822msgid:` — Specific message ID header. - `AROUND ` — Find words near each other (for example, `holiday AROUND 10 vacation`). Labels & Categories: - `label:` — Under a specific label, matched by its display name (the `name` from `list_labels`), for example `label:wins`. Label IDs such as `Label_123` match nothing. Quote a name that contains spaces (`label:\"Board Prep\"`) or replace its spaces and `/` with `-` (`label:board-prep`). - `category:` — In a category (primary, social, promotions, updates, forums, reservations, purchases). - `in:` — Search in specific labels (archive, snoozed, trash, sent, inbox, important, starred). For example, `in:trash`, `in:inbox`. Note: Drafts, archived, and sent messages are included by default; use `-in:draft`, `-in:archive`, and `-in:sent` to exclude them. Use `in:inbox` to restrict search to the inbox only. - `has:userlabels` — Has any user labels. - `has:nouserlabels` — Does not have any user labels. - `has:*-star` — Specific star colors (if enabled, for example, `has:yellow-star`). Status: - `is:` — Search by status (important, starred, unread, read, muted). Size: - `size:` — Specific size in bytes. - `larger:` / `smaller:` — Larger or smaller than a size (for example, `10M` for 10 MB). Logic & Grouping: - `AND` — Match all criteria (default behavior). - `OR` or `{ }` — Match one or more criteria (for example, `from:amy OR from:david`, `{from:amy from:david}`). - `-` (minus) — Exclude criteria (for example, `-movie`). - `( )` — Group multiple search terms (for example, `subject:(dinner film)`). Examples: - `subject:OneMCP Update` - `from:[email protected]` - `to:[email protected] AND newer_than:7d` - `project proposal has:attachment` - `is:unread` A space or a dash (`-`) separates numbers, while a dot (`.`) is treated as a decimal. For example, `01.2047-100` is considered two numbers: `01.2047` and `100`. To search for hyphenated or dotted identifiers (such as order numbers, tracking IDs, or invoice codes like `INV-12345`), enclose them in double quotes (e.g., `\"INV-12345\"` or `\"01.2047-100\"`) so the dash is not interpreted as a negation operator and exact phrase matching is preserved. Note: If we want to ensure all drafts for the query are returned, we can paginate the results by making repeated calls to the tool until the response contains an empty list of drafts."
},
"pageSize": {
"type": "integer",
"format": "int32",
"description": "Optional. The maximum number of drafts to return. If unspecified, defaults to 20. The maximum allowed value is 50."
},
"pageToken": {
"type": "string",
"description": "Optional. A token received from a previous `list_drafts` call to retrieve the next page of results. Leave empty to fetch the first page. This is primarily used for pagination to continue fetching results from where the previous `ListDraft` call left off, especially when the number of drafts matching the query exceeds the `page_size` limit."
}
},
"description": "Request message for ListDrafts RPC."
},
"outputSchema": {
"type": "object",
"$defs": {
"Draft": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the draft resource."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the draft in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The subject line of the draft message."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the draft in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML body content of the draft, if available."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The ids of the labels attached to the draft message."
},
"threadId": {
"type": "string",
"description": "The ID of the thread this draft belongs to."
},
"messageId": {
"type": "string",
"description": "The ID of the message associated with this draft."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Cc' recipient email addresses extracted from headers."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'To' recipient email addresses extracted from headers."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Bcc' recipient email addresses extracted from headers."
},
"plaintextBody": {
"type": "string",
"description": "Plain text body content, if available."
}
},
"description": "Details of a draft."
}
},
"properties": {
"drafts": {
"type": "array",
"items": {
"$ref": "#/$defs/Draft"
},
"description": "List of drafts."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used in a subsequent call to retrieve the next page of drafts. If the number of drafts matching the query exceeds the `page_size` limit, the response will contain a `next_page_token`. To retrieve the next page of results, pass this token in the `page_token` field of the next `ListDraftsRequest`."
}
},
"description": "Response message for ListDrafts RPC."
},
"annotations": {
"title": "List draft emails",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description87/100
Retrieves a specific draft email from the authenticated user's Gmail account by ID, including its `viewUrl` for viewing and editing in the Gmail Web UI.
The optional `messageFormat` parameter controls the format of the draft returned. Use `MINIMAL` to return snippet and key headers, `METADATA_ONLY` to exclude snippet, subject, and body, `FULL_CONTENT` for the complete draft, or `RAW` for the raw MIME message content.
Resolve contradictions between the description, input schema, and annotations.
Inputs63/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
draftId
Required. The unique identifier of the draft to fetch.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
messageFormat
Optional. Specifies the format of the draft returned. Defaults to `FULL_CONTENT`.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the draft resource."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the draft in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The subject line of the draft message."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the draft in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML body content of the draft, if available."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The ids of the labels attached to the draft message."
},
"threadId": {
"type": "string",
"description": "The ID of the thread this draft belongs to."
},
"messageId": {
"type": "string",
"description": "The ID of the message associated with this draft."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Cc' recipient email addresses extracted from headers."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'To' recipient email addresses extracted from headers."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Bcc' recipient email addresses extracted from headers."
},
"plaintextBody": {
"type": "string",
"description": "Plain text body content, if available."
}
},
"description": "Details of a draft."
}
Original tool metadata
{
"name": "get_draft",
"description": "Retrieves a specific draft email from the authenticated user's Gmail account by ID, including its `viewUrl` for viewing and editing in the Gmail Web UI.\n\nThe optional `messageFormat` parameter controls the format of the draft returned. Use `MINIMAL` to return snippet and key headers, `METADATA_ONLY` to exclude snippet, subject, and body, `FULL_CONTENT` for the complete draft, or `RAW` for the raw MIME message content.\n",
"inputSchema": {
"type": "object",
"required": [
"draftId"
],
"properties": {
"draftId": {
"type": "string",
"description": "Required. The unique identifier of the draft to fetch."
},
"messageFormat": {
"enum": [
"MESSAGE_FORMAT_UNSPECIFIED",
"MINIMAL",
"FULL_CONTENT",
"METADATA_ONLY",
"PLAIN_TEXT",
"RAW"
],
"type": "string",
"description": "Optional. Specifies the format of the draft returned. Defaults to `FULL_CONTENT`.",
"x-google-enum-descriptions": [
"Defaults to FULL_CONTENT.",
"Returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). Omits `plaintext_body`, `html_body`, `attachment_ids`, `attachments`.",
"Returns all message fields (`id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `html_body`, `attachments`, `view_url`) if applicable.",
"Returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). Omits `subject`, `snippet`, `plaintext_body`, `html_body`, `attachment_ids`, `attachments`.",
"Returns all information in `MINIMAL` plus `plaintext_body`, `attachment_ids`, and `attachments` (if applicable). If plain text body is not available, converts the HTML body to plain text/markdown. Omits `html_body`.",
"Returns the raw MIME message content."
]
}
},
"description": "Request message for GetDraft RPC."
},
"outputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the draft resource."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the draft in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The subject line of the draft message."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the draft in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML body content of the draft, if available."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The ids of the labels attached to the draft message."
},
"threadId": {
"type": "string",
"description": "The ID of the thread this draft belongs to."
},
"messageId": {
"type": "string",
"description": "The ID of the message associated with this draft."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Cc' recipient email addresses extracted from headers."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'To' recipient email addresses extracted from headers."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of 'Bcc' recipient email addresses extracted from headers."
},
"plaintextBody": {
"type": "string",
"description": "Plain text body content, if available."
}
},
"description": "Details of a draft."
},
"annotations": {
"title": "Get draft email",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description96/100
Retrieves a specific email thread from the authenticated user's Gmail account, including its `viewUrl` and a list of its messages (each with their own `viewUrl`).
Note: This tool does not support retrieving drafts. Any draft messages within a thread are omitted. To view drafts, use the `list_drafts` tool instead.
The optional `messageFormat` parameter controls the format of the messages returned. By default (or with `FULL_CONTENT`), it returns the full content of messages. We recommend using `PLAIN_TEXT`, which returns the plain text body without the HTML body. Use `MINIMAL` to include only subject and snippet (excluding body). Use `METADATA_ONLY` to include only basic metadata (message ID, thread ID, viewUrl, labels, timestamp, and size estimate).
The description explains the capability, when to use it, and what to expect.
Inputs63/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
messageFormat
Optional. Specifies the format of the messages returned within the thread. Defaults to `FULL_CONTENT`. We recommend using `PLAIN_TEXT` to prevent context exhaustion. Note: `MINIMAL` format returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). `METADATA_ONLY` format returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). `FULL_CONTENT` returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `html_body`, `attachments`, `view_url` (if applicable). `PLAIN_TEXT` returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `attachments`, `view_url` (if applicable, without `html_body`).
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
threadId
Required. The unique identifier of the thread to fetch.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
Align the output schema with the tool’s documented result.
View output schema
{
"type": "object",
"$defs": {
"Message": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the message."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The message subject extracted from headers:"
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the message in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML content of the email, only populated if MessageFormat was FULL_CONTENT."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "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`."
},
"threadId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the thread this message belongs to."
},
"historyId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the last history record that modified this message."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/AttachmentMetadata"
},
"readOnly": true,
"description": "Output only. The attachments, only populated if MessageFormat was FULL_CONTENT."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "CC recipient email addresses."
},
"internalDate": {
"type": "string",
"readOnly": true,
"description": "Output only. The internal message creation timestamp (epoch ms)."
},
"sizeEstimate": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Estimated size in bytes of the message."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "To recipient email addresses."
},
"attachmentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"description": "Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "BCC recipient email addresses."
},
"plaintextBody": {
"type": "string",
"description": "Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"originalMessageId": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages."
}
},
"description": "Message within a thread."
},
"AttachmentMetadata": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the attachment."
},
"partId": {
"type": "string",
"readOnly": true,
"description": "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\")."
},
"filename": {
"type": "string",
"description": "The filename of the attachment."
},
"mimeType": {
"type": "string",
"description": "The MIME type of the attachment."
}
},
"description": "Represents an attachment associated with a message."
}
},
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the thread."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the thread in the Gmail Web UI."
},
"messages": {
"type": "array",
"items": {
"$ref": "#/$defs/Message"
},
"description": "A list of messages in the thread, ordered chronologically."
},
"messageCount": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Total number of messages in this thread in Gmail."
}
},
"description": "Thread containing a list of messages."
}
Original tool metadata
{
"name": "get_thread",
"description": "Retrieves a specific email thread from the authenticated user's Gmail account, including its `viewUrl` and a list of its messages (each with their own `viewUrl`).\n\nNote: This tool does not support retrieving drafts. Any draft messages within a thread are omitted. To view drafts, use the `list_drafts` tool instead.\n\nThe optional `messageFormat` parameter controls the format of the messages returned. By default (or with `FULL_CONTENT`), it returns the full content of messages. We recommend using `PLAIN_TEXT`, which returns the plain text body without the HTML body. Use `MINIMAL` to include only subject and snippet (excluding body). Use `METADATA_ONLY` to include only basic metadata (message ID, thread ID, viewUrl, labels, timestamp, and size estimate).\n",
"inputSchema": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string",
"description": "Required. The unique identifier of the thread to fetch."
},
"messageFormat": {
"enum": [
"MESSAGE_FORMAT_UNSPECIFIED",
"MINIMAL",
"FULL_CONTENT",
"METADATA_ONLY",
"PLAIN_TEXT"
],
"type": "string",
"description": "Optional. Specifies the format of the messages returned within the thread. Defaults to `FULL_CONTENT`. We recommend using `PLAIN_TEXT` to prevent context exhaustion. Note: `MINIMAL` format returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). `METADATA_ONLY` format returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). `FULL_CONTENT` returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `html_body`, `attachments`, `view_url` (if applicable). `PLAIN_TEXT` returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `attachments`, `view_url` (if applicable, without `html_body`).",
"x-google-enum-descriptions": [
"Defaults to FULL_CONTENT.",
"Returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). Omits `plaintext_body`, `html_body`, `attachment_ids`, `attachments`.",
"Returns all message fields (`id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `html_body`, `attachments`, `view_url`) if applicable.",
"Returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). Omits `subject`, `snippet`, `plaintext_body`, `html_body`, `attachment_ids`, `attachments`.",
"Returns all information in `MINIMAL` plus `plaintext_body`, `attachment_ids`, and `attachments` (if applicable). If plain text body is not available, converts the HTML body to plain text/markdown. Omits `html_body`."
]
}
},
"description": "Request message for GetThread RPC."
},
"outputSchema": {
"type": "object",
"$defs": {
"Message": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the message."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The message subject extracted from headers:"
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the message in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML content of the email, only populated if MessageFormat was FULL_CONTENT."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "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`."
},
"threadId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the thread this message belongs to."
},
"historyId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the last history record that modified this message."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/AttachmentMetadata"
},
"readOnly": true,
"description": "Output only. The attachments, only populated if MessageFormat was FULL_CONTENT."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "CC recipient email addresses."
},
"internalDate": {
"type": "string",
"readOnly": true,
"description": "Output only. The internal message creation timestamp (epoch ms)."
},
"sizeEstimate": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Estimated size in bytes of the message."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "To recipient email addresses."
},
"attachmentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"description": "Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "BCC recipient email addresses."
},
"plaintextBody": {
"type": "string",
"description": "Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"originalMessageId": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages."
}
},
"description": "Message within a thread."
},
"AttachmentMetadata": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the attachment."
},
"partId": {
"type": "string",
"readOnly": true,
"description": "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\")."
},
"filename": {
"type": "string",
"description": "The filename of the attachment."
},
"mimeType": {
"type": "string",
"description": "The MIME type of the attachment."
}
},
"description": "Represents an attachment associated with a message."
}
},
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the thread."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the thread in the Gmail Web UI."
},
"messages": {
"type": "array",
"items": {
"$ref": "#/$defs/Message"
},
"description": "A list of messages in the thread, ordered chronologically."
},
"messageCount": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Total number of messages in this thread in Gmail."
}
},
"description": "Thread containing a list of messages."
},
"annotations": {
"title": "Get email thread",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description95/100
Retrieves a specific email message from the authenticated user's Gmail account by its unique message ID, including its `viewUrl`.
Use this tool to inspect a single, individual email when you already know its message ID. If the user wants to read a specific email in detail, check the exact wording of a message, or examine attachment metadata for a single email, this is the right tool. It is not suitable for retrieving entire conversations or viewing back-and-forth discussion threads; use the 'get_thread' tool instead.
Note: This tool does not support retrieving draft messages. To view drafts, use the 'list_drafts' tool instead.
Key indicators include if the user asks for the full content of a specific message ID returned by a previous search, or if the query asks to inspect a specific individual email rather than an entire thread.
Example user prompts are: "Get the full text of message ID 18f123456789abcd.", "Read the latest message in that thread from Alice.", and "What are the attachment names in the email I just received from HR?"
The optional `messageFormat` parameter controls the format of the message returned. By default (or with `FULL_CONTENT`), it returns the full content of the message. We recommend using `PLAIN_TEXT`, which returns the plain text body without the HTML body. Use `MINIMAL` to include only subject and snippet (excluding body). Use `METADATA_ONLY` to include only basic metadata (message ID, thread ID, viewUrl, labels, timestamp, and size estimate).
The description explains the capability, when to use it, and what to expect.
Inputs63/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
messageFormat
Optional. Specifies the format of the message returned. Defaults to `FULL_CONTENT`. We recommend using `PLAIN_TEXT` to prevent context exhaustion.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
messageId
Required. The unique identifier of the message to fetch.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
Align the output schema with the tool’s documented result.
View output schema
{
"type": "object",
"$defs": {
"AttachmentMetadata": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the attachment."
},
"partId": {
"type": "string",
"readOnly": true,
"description": "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\")."
},
"filename": {
"type": "string",
"description": "The filename of the attachment."
},
"mimeType": {
"type": "string",
"description": "The MIME type of the attachment."
}
},
"description": "Represents an attachment associated with a message."
}
},
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the message."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The message subject extracted from headers:"
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the message in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML content of the email, only populated if MessageFormat was FULL_CONTENT."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "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`."
},
"threadId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the thread this message belongs to."
},
"historyId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the last history record that modified this message."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/AttachmentMetadata"
},
"readOnly": true,
"description": "Output only. The attachments, only populated if MessageFormat was FULL_CONTENT."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "CC recipient email addresses."
},
"internalDate": {
"type": "string",
"readOnly": true,
"description": "Output only. The internal message creation timestamp (epoch ms)."
},
"sizeEstimate": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Estimated size in bytes of the message."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "To recipient email addresses."
},
"attachmentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"description": "Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "BCC recipient email addresses."
},
"plaintextBody": {
"type": "string",
"description": "Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"originalMessageId": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages."
}
},
"description": "Message within a thread."
}
Original tool metadata
{
"name": "get_message",
"description": "Retrieves a specific email message from the authenticated user's Gmail account by its unique message ID, including its `viewUrl`.\n\nUse this tool to inspect a single, individual email when you already know its message ID. If the user wants to read a specific email in detail, check the exact wording of a message, or examine attachment metadata for a single email, this is the right tool. It is not suitable for retrieving entire conversations or viewing back-and-forth discussion threads; use the 'get_thread' tool instead.\nNote: This tool does not support retrieving draft messages. To view drafts, use the 'list_drafts' tool instead.\nKey indicators include if the user asks for the full content of a specific message ID returned by a previous search, or if the query asks to inspect a specific individual email rather than an entire thread.\nExample user prompts are: \"Get the full text of message ID 18f123456789abcd.\", \"Read the latest message in that thread from Alice.\", and \"What are the attachment names in the email I just received from HR?\" \n\nThe optional `messageFormat` parameter controls the format of the message returned. By default (or with `FULL_CONTENT`), it returns the full content of the message. We recommend using `PLAIN_TEXT`, which returns the plain text body without the HTML body. Use `MINIMAL` to include only subject and snippet (excluding body). Use `METADATA_ONLY` to include only basic metadata (message ID, thread ID, viewUrl, labels, timestamp, and size estimate).\n",
"inputSchema": {
"type": "object",
"required": [
"messageId"
],
"properties": {
"messageId": {
"type": "string",
"description": "Required. The unique identifier of the message to fetch."
},
"messageFormat": {
"enum": [
"MESSAGE_FORMAT_UNSPECIFIED",
"MINIMAL",
"FULL_CONTENT",
"METADATA_ONLY",
"PLAIN_TEXT",
"RAW"
],
"type": "string",
"description": "Optional. Specifies the format of the message returned. Defaults to `FULL_CONTENT`. We recommend using `PLAIN_TEXT` to prevent context exhaustion.",
"x-google-enum-descriptions": [
"Defaults to FULL_CONTENT.",
"Returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). Omits `plaintext_body`, `html_body`, `attachment_ids`, `attachments`.",
"Returns all message fields (`id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `attachment_ids`, `plaintext_body`, `html_body`, `attachments`, `view_url`) if applicable.",
"Returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable). Omits `subject`, `snippet`, `plaintext_body`, `html_body`, `attachment_ids`, `attachments`.",
"Returns all information in `MINIMAL` plus `plaintext_body`, `attachment_ids`, and `attachments` (if applicable). If plain text body is not available, converts the HTML body to plain text/markdown. Omits `html_body`.",
"Returns the raw MIME message content."
]
}
},
"description": "Request message for GetMessage RPC."
},
"outputSchema": {
"type": "object",
"$defs": {
"AttachmentMetadata": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the attachment."
},
"partId": {
"type": "string",
"readOnly": true,
"description": "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\")."
},
"filename": {
"type": "string",
"description": "The filename of the attachment."
},
"mimeType": {
"type": "string",
"description": "The MIME type of the attachment."
}
},
"description": "Represents an attachment associated with a message."
}
},
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the message."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The message subject extracted from headers:"
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the message in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML content of the email, only populated if MessageFormat was FULL_CONTENT."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "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`."
},
"threadId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the thread this message belongs to."
},
"historyId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the last history record that modified this message."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/AttachmentMetadata"
},
"readOnly": true,
"description": "Output only. The attachments, only populated if MessageFormat was FULL_CONTENT."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "CC recipient email addresses."
},
"internalDate": {
"type": "string",
"readOnly": true,
"description": "Output only. The internal message creation timestamp (epoch ms)."
},
"sizeEstimate": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Estimated size in bytes of the message."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "To recipient email addresses."
},
"attachmentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"description": "Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "BCC recipient email addresses."
},
"plaintextBody": {
"type": "string",
"description": "Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"originalMessageId": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages."
}
},
"description": "Message within a thread."
},
"annotations": {
"title": "Get email message",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description98/100
Lists email threads from the authenticated user's Gmail account.
This tool can filter threads based on a query string and supports pagination. It returns a list of threads, each with its thread `id`, `messageCount` (total messages in the thread), `viewUrl`, and a subset of up to 5 related messages (each with its own message `id`, `viewUrl`, `sender`, recipients, `date`, and `labelIds`). Use this tool to find thread `id`s matching a query before reading full threads or performing actions on matching emails or threads. The `view` parameter controls which additional fields are populated in the returned message subset. By default (or with `THREAD_VIEW_MINIMAL`), it includes `subject` and `snippet`. Use `THREAD_VIEW_METADATA_ONLY` to exclude `subject` and `snippet`. Full message bodies, attachment metadata, and messages beyond the 5-message subset are not returned by this tool; use the 'get_thread' tool with a thread ID to retrieve all messages (and their message IDs) in a thread or to fetch full message bodies. Threads with excluded criteria may still appear in the results. This occurs because Gmail identifies matching messages first. For example, if you search for -is:starred, Gmail will find an entire thread if it contains at least one unstarred message, even if other emails in that same conversation are starred.
To list threads in a specific inbox category tab, use the `category:` operator with `primary`, `social`, `promotions`, `updates`, or `forums` (e.g. `in:inbox category:promotions`).
When filtering by date, `after:` and `before:` both evaluate against midnight (00:00:00) of the specified date (`after:` is inclusive, `before:` is exclusive). To search through a specific day D (or for a date range), set `before:` to the day after (e.g. `after:2026/02/01 before:2026/02/02` for Feb 1, or `after:2026/02/01 before:2026/02/06` for Feb 1–5).
When searching for numbers, a space or dash (`-`) separates numbers while a dot (`.`) is treated as a decimal (e.g., `01.2047-100` is parsed as two numbers: `01.2047` and `100`). To search for hyphenated or dotted identifiers (such as order numbers, tracking IDs, or invoice codes like `INV-12345`), enclose them in double quotes (e.g. "INV-12345" or "01.2047-100") so the dash is not interpreted as a negation operator.
Note: An empty JSON object `{}` represents zero matching items, not an error.
The description explains the capability, when to use it, and what to expect.
Inputs80/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
includeTrash
Optional. Include threads from TRASH in the results. Defaults to false.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageSize
Optional. The maximum number of threads to return. If unspecified, defaults to 20. The maximum allowed value is 50.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
pageToken
Optional. Page token to retrieve a specific page of results in the list. Leave empty to fetch the first page. This is primarily used for pagination to continue fetching results from where the previous `SearchThreads` call left off, especially when the number of threads matching the query exceeds the `page_size` limit.
Clear enough to supply this argument.
query
Optional. A query string to filter the threads. Natural language queries must be pre-converted into Gmail syntax queries to use this tool. If omitted, all threads (excluding spam and trash by default) are listed. Supported Operators by Category: Sender & Recipient: - `from:` — Sent from a specific person. - `to:` — Sent to a specific person. - `cc:` — Specific people in Cc. - `bcc:` — Specific people in Bcc. - `deliveredto:` — Delivered to a specific address. - `list:` — From a specific mailing list. Time & Date: - `after:YYYY/MM/DD` / `newer:YYYY/MM/DD` — Received after a date (evaluates against midnight 00:00:00 of that day, inclusive). - `before:YYYY/MM/DD` / `older:YYYY/MM/DD` — Received before a date (evaluates against midnight 00:00:00 of that day, exclusive; excludes that day). To search through a specific day D (or for a single day D), set `before:` to the day after (for example, `after:2026/02/01 before:2026/02/02` for Feb 1, or `after:2026/02/01 before:2026/02/06` for Feb 1–5). - `older_than:` — Older than a duration (for example, `1y`, `2d`). - `newer_than:` — Newer than a duration. Content: - `subject:` — Words in the subject line. - `has:` — Has specific content types (attachment, drive, youtube, document). - `filename:` — Attachment with a specific name or type. - `""` — Search for an exact word or phrase. (for example, `"holiday"`, `"holiday vacation"`). Note: Double quotes enforce strict contiguous phrase matching. For topic, discussion, or keyword queries, prefer unquoted keywords (e.g. `partner advertising` instead of `"partner advertising"`). - `+` — Match a word exactly. (for example, `+holiday`, `+unicorn`) - `rfc822msgid:` — Specific message ID header. - `AROUND ` — Find words near each other (for example, `holiday AROUND 10 vacation`). Labels & Categories: - `label:` — Under a specific label, matched by its display name (the `name` from `list_labels`), for example `label:wins`. Label IDs such as `Label_123` match nothing. Quote a name that contains spaces (`label:"Board Prep"`) or replace its spaces and `/` with `-` (`label:board-prep`). - `category:` — In a category (primary, social, promotions, updates, forums, reservations, purchases). - `in:` — Search in specific labels (archive, snoozed, trash, sent, inbox). For example, `in:trash`, `in:inbox`. Archived and sent messages are included by default; use `-in:archive` and `-in:sent` to exclude them. Drafts are explicitly excluded by default by the tool. Use `in:inbox` to restrict search to the inbox only. - `has:userlabels` — Has any user labels. - `has:nouserlabels` — Does not have any user labels. - `has:*-star` — Specific star colors (if enabled, for example, `has:yellow-star`). - `in:draft` — Search in drafts. -in:draft means exclude drafts from the search results. - `in:sent` — Search in sent messages. - `in:anywhere` — Search across all folders, including Trash. Emails that are spam, confidential, encrypted, or suspicious are still filtered out for security. Status: - `is:` — Search by status (important, starred, unread, read, muted). Size: - `size:` — Specific size in bytes. - `larger:` / `smaller:` — Larger or smaller than a size (for example, `10M` for 10 MB). Logic & Grouping: - `AND` — Match all criteria (default behavior). - `OR` or `{ }` — Match one or more criteria (for example, `from:amy OR from:david`, `{from:amy from:david}`). - `-` (minus) — Exclude criteria (for example, `-movie`). - `( )` — Group multiple search terms (for example, `subject:(dinner film)`). Examples: - `subject:OneMCP Update` - `from:[email protected]` - `to:[email protected] AND newer_than:7d` - `project proposal has:attachment` - `is:unread -in:draft` A space or a dash (`-`) separates numbers, while a dot (`.`) is treated as a decimal. For example, `01.2047-100` is considered two numbers: `01.2047` and `100`. To search for hyphenated or dotted identifiers (such as order numbers, tracking IDs, or invoice codes like `INV-12345`), enclose them in double quotes (e.g., `"INV-12345"` or `"01.2047-100"`) so the dash is not interpreted as a negation operator and exact phrase matching is preserved. To prevent overly strict queries, favor concise, keyword-based queries over long subject strings or full sentences. Avoid copying overly detailed subjects from the user prompt verbatim, as this often leads to search misses. Instead, extract the most unique keywords (e.g., subject:amazon \"delivery\" OR \"order\" instead of \"amazon order\"). Use boolean operators to broaden your search coverage. Use OR to search for synonyms or multiple potential senders, and use ( ) for grouping criteria. Note that whitespace between terms acts as an implicit AND.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
view
Optional. Controls the fields populated for threads in the thread list. Defaults to `THREAD_VIEW_MINIMAL`. `THREAD_VIEW_MINIMAL` returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`. `THREAD_VIEW_METADATA_ONLY` returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
Align the output schema with the tool’s documented result.
View output schema
{
"type": "object",
"$defs": {
"Thread": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the thread."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the thread in the Gmail Web UI."
},
"messages": {
"type": "array",
"items": {
"$ref": "#/$defs/Message"
},
"description": "A list of messages in the thread, ordered chronologically."
},
"messageCount": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Total number of messages in this thread in Gmail."
}
},
"description": "Thread containing a list of messages."
},
"Message": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the message."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The message subject extracted from headers:"
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the message in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML content of the email, only populated if MessageFormat was FULL_CONTENT."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "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`."
},
"threadId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the thread this message belongs to."
},
"historyId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the last history record that modified this message."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/AttachmentMetadata"
},
"readOnly": true,
"description": "Output only. The attachments, only populated if MessageFormat was FULL_CONTENT."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "CC recipient email addresses."
},
"internalDate": {
"type": "string",
"readOnly": true,
"description": "Output only. The internal message creation timestamp (epoch ms)."
},
"sizeEstimate": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Estimated size in bytes of the message."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "To recipient email addresses."
},
"attachmentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"description": "Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "BCC recipient email addresses."
},
"plaintextBody": {
"type": "string",
"description": "Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"originalMessageId": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages."
}
},
"description": "Message within a thread."
},
"AttachmentMetadata": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the attachment."
},
"partId": {
"type": "string",
"readOnly": true,
"description": "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\")."
},
"filename": {
"type": "string",
"description": "The filename of the attachment."
},
"mimeType": {
"type": "string",
"description": "The MIME type of the attachment."
}
},
"description": "Represents an attachment associated with a message."
}
},
"properties": {
"threads": {
"type": "array",
"items": {
"$ref": "#/$defs/Thread"
},
"description": "List of thread summaries."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used in a subsequent call to retrieve the next page of threads. Present only if there are more results. If the number of threads matching the query exceeds the `page_size` limit, the response will contain a `next_page_token`. To retrieve the next page of results, pass this token in the `page_token` field of the next `SearchThreadsRequest`."
},
"resultCountEstimate": {
"type": "string",
"format": "int64",
"description": "The estimated result count for this query. It should be treated as a lower bound, so for example if it is 500, then the count can be reported to the user as \"500+\"."
}
},
"description": "Response message for SearchThreads RPC."
}
Original tool metadata
{
"name": "search_threads",
"description": "Lists email threads from the authenticated user's Gmail account.\n\nThis tool can filter threads based on a query string and supports pagination. It returns a list of threads, each with its thread `id`, `messageCount` (total messages in the thread), `viewUrl`, and a subset of up to 5 related messages (each with its own message `id`, `viewUrl`, `sender`, recipients, `date`, and `labelIds`). Use this tool to find thread `id`s matching a query before reading full threads or performing actions on matching emails or threads. The `view` parameter controls which additional fields are populated in the returned message subset. By default (or with `THREAD_VIEW_MINIMAL`), it includes `subject` and `snippet`. Use `THREAD_VIEW_METADATA_ONLY` to exclude `subject` and `snippet`. Full message bodies, attachment metadata, and messages beyond the 5-message subset are not returned by this tool; use the 'get_thread' tool with a thread ID to retrieve all messages (and their message IDs) in a thread or to fetch full message bodies. Threads with excluded criteria may still appear in the results. This occurs because Gmail identifies matching messages first. For example, if you search for -is:starred, Gmail will find an entire thread if it contains at least one unstarred message, even if other emails in that same conversation are starred.\n\nTo list threads in a specific inbox category tab, use the `category:` operator with `primary`, `social`, `promotions`, `updates`, or `forums` (e.g. `in:inbox category:promotions`).\n\nWhen filtering by date, `after:` and `before:` both evaluate against midnight (00:00:00) of the specified date (`after:` is inclusive, `before:` is exclusive). To search through a specific day D (or for a date range), set `before:` to the day after (e.g. `after:2026/02/01 before:2026/02/02` for Feb 1, or `after:2026/02/01 before:2026/02/06` for Feb 1–5).\n\nWhen searching for numbers, a space or dash (`-`) separates numbers while a dot (`.`) is treated as a decimal (e.g., `01.2047-100` is parsed as two numbers: `01.2047` and `100`). To search for hyphenated or dotted identifiers (such as order numbers, tracking IDs, or invoice codes like `INV-12345`), enclose them in double quotes (e.g. \"INV-12345\" or \"01.2047-100\") so the dash is not interpreted as a negation operator.\n\nNote: An empty JSON object `{}` represents zero matching items, not an error.\n",
"inputSchema": {
"type": "object",
"properties": {
"view": {
"enum": [
"THREAD_VIEW_UNSPECIFIED",
"THREAD_VIEW_METADATA_ONLY",
"THREAD_VIEW_MINIMAL"
],
"type": "string",
"description": "Optional. Controls the fields populated for threads in the thread list. Defaults to `THREAD_VIEW_MINIMAL`. `THREAD_VIEW_MINIMAL` returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`. `THREAD_VIEW_METADATA_ONLY` returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`.",
"x-google-enum-descriptions": [
"Maps to THREAD_VIEW_MINIMAL for backward compatibility.",
"Returns `id`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable).",
"Returns `id`, `snippet`, `subject`, `sender`, `to_recipients`, `cc_recipients`, `bcc_recipients`, `date`, `label_ids`, `view_url` (if applicable)."
]
},
"query": {
"type": "string",
"description": "Optional. A query string to filter the threads. Natural language queries must be pre-converted into Gmail syntax queries to use this tool. If omitted, all threads (excluding spam and trash by default) are listed. Supported Operators by Category: Sender & Recipient: - `from:` — Sent from a specific person. - `to:` — Sent to a specific person. - `cc:` — Specific people in Cc. - `bcc:` — Specific people in Bcc. - `deliveredto:` — Delivered to a specific address. - `list:` — From a specific mailing list. Time & Date: - `after:YYYY/MM/DD` / `newer:YYYY/MM/DD` — Received after a date (evaluates against midnight 00:00:00 of that day, inclusive). - `before:YYYY/MM/DD` / `older:YYYY/MM/DD` — Received before a date (evaluates against midnight 00:00:00 of that day, exclusive; excludes that day). To search through a specific day D (or for a single day D), set `before:` to the day after (for example, `after:2026/02/01 before:2026/02/02` for Feb 1, or `after:2026/02/01 before:2026/02/06` for Feb 1–5). - `older_than:` — Older than a duration (for example, `1y`, `2d`). - `newer_than:` — Newer than a duration. Content: - `subject:` — Words in the subject line. - `has:` — Has specific content types (attachment, drive, youtube, document). - `filename:` — Attachment with a specific name or type. - `\"\"` — Search for an exact word or phrase. (for example, `\"holiday\"`, `\"holiday vacation\"`). Note: Double quotes enforce strict contiguous phrase matching. For topic, discussion, or keyword queries, prefer unquoted keywords (e.g. `partner advertising` instead of `\"partner advertising\"`). - `+` — Match a word exactly. (for example, `+holiday`, `+unicorn`) - `rfc822msgid:` — Specific message ID header. - `AROUND ` — Find words near each other (for example, `holiday AROUND 10 vacation`). Labels & Categories: - `label:` — Under a specific label, matched by its display name (the `name` from `list_labels`), for example `label:wins`. Label IDs such as `Label_123` match nothing. Quote a name that contains spaces (`label:\"Board Prep\"`) or replace its spaces and `/` with `-` (`label:board-prep`). - `category:` — In a category (primary, social, promotions, updates, forums, reservations, purchases). - `in:` — Search in specific labels (archive, snoozed, trash, sent, inbox). For example, `in:trash`, `in:inbox`. Archived and sent messages are included by default; use `-in:archive` and `-in:sent` to exclude them. Drafts are explicitly excluded by default by the tool. Use `in:inbox` to restrict search to the inbox only. - `has:userlabels` — Has any user labels. - `has:nouserlabels` — Does not have any user labels. - `has:*-star` — Specific star colors (if enabled, for example, `has:yellow-star`). - `in:draft` — Search in drafts. -in:draft means exclude drafts from the search results. - `in:sent` — Search in sent messages. - `in:anywhere` — Search across all folders, including Trash. Emails that are spam, confidential, encrypted, or suspicious are still filtered out for security. Status: - `is:` — Search by status (important, starred, unread, read, muted). Size: - `size:` — Specific size in bytes. - `larger:` / `smaller:` — Larger or smaller than a size (for example, `10M` for 10 MB). Logic & Grouping: - `AND` — Match all criteria (default behavior). - `OR` or `{ }` — Match one or more criteria (for example, `from:amy OR from:david`, `{from:amy from:david}`). - `-` (minus) — Exclude criteria (for example, `-movie`). - `( )` — Group multiple search terms (for example, `subject:(dinner film)`). Examples: - `subject:OneMCP Update` - `from:[email protected]` - `to:[email protected] AND newer_than:7d` - `project proposal has:attachment` - `is:unread -in:draft` A space or a dash (`-`) separates numbers, while a dot (`.`) is treated as a decimal. For example, `01.2047-100` is considered two numbers: `01.2047` and `100`. To search for hyphenated or dotted identifiers (such as order numbers, tracking IDs, or invoice codes like `INV-12345`), enclose them in double quotes (e.g., `\"INV-12345\"` or `\"01.2047-100\"`) so the dash is not interpreted as a negation operator and exact phrase matching is preserved. To prevent overly strict queries, favor concise, keyword-based queries over long subject strings or full sentences. Avoid copying overly detailed subjects from the user prompt verbatim, as this often leads to search misses. Instead, extract the most unique keywords (e.g., subject:amazon \\\"delivery\\\" OR \\\"order\\\" instead of \\\"amazon order\\\"). Use boolean operators to broaden your search coverage. Use OR to search for synonyms or multiple potential senders, and use ( ) for grouping criteria. Note that whitespace between terms acts as an implicit AND."
},
"pageSize": {
"type": "integer",
"format": "int32",
"description": "Optional. The maximum number of threads to return. If unspecified, defaults to 20. The maximum allowed value is 50."
},
"pageToken": {
"type": "string",
"description": "Optional. Page token to retrieve a specific page of results in the list. Leave empty to fetch the first page. This is primarily used for pagination to continue fetching results from where the previous `SearchThreads` call left off, especially when the number of threads matching the query exceeds the `page_size` limit."
},
"includeTrash": {
"type": "boolean",
"description": "Optional. Include threads from TRASH in the results. Defaults to false."
}
},
"description": "Request message for SearchThreads RPC."
},
"outputSchema": {
"type": "object",
"$defs": {
"Thread": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the thread."
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the thread in the Gmail Web UI."
},
"messages": {
"type": "array",
"items": {
"$ref": "#/$defs/Message"
},
"description": "A list of messages in the thread, ordered chronologically."
},
"messageCount": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Total number of messages in this thread in Gmail."
}
},
"description": "Thread containing a list of messages."
},
"Message": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the message."
},
"raw": {
"type": "string",
"description": "The raw MIME message content, only populated if MessageFormat was RAW."
},
"date": {
"type": "string",
"description": "Date of the message in RFC 3339 UTC timestamp format (YYYY-MM-DDTHH:MM:SSZ)."
},
"sender": {
"type": "string",
"description": "Sender email address."
},
"snippet": {
"type": "string",
"description": "Snippet of the message body."
},
"subject": {
"type": "string",
"description": "The message subject extracted from headers:"
},
"viewUrl": {
"type": "string",
"readOnly": true,
"description": "Output only. Web URL to view the message in the Gmail Web UI."
},
"htmlBody": {
"type": "string",
"description": "The HTML content of the email, only populated if MessageFormat was FULL_CONTENT."
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "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`."
},
"threadId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the thread this message belongs to."
},
"historyId": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the last history record that modified this message."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/$defs/AttachmentMetadata"
},
"readOnly": true,
"description": "Output only. The attachments, only populated if MessageFormat was FULL_CONTENT."
},
"ccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "CC recipient email addresses."
},
"internalDate": {
"type": "string",
"readOnly": true,
"description": "Output only. The internal message creation timestamp (epoch ms)."
},
"sizeEstimate": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "Output only. Estimated size in bytes of the message."
},
"toRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "To recipient email addresses."
},
"attachmentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"description": "Output only. The attachment ids, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"bccRecipients": {
"type": "array",
"items": {
"type": "string"
},
"description": "BCC recipient email addresses."
},
"plaintextBody": {
"type": "string",
"description": "Full body content, only populated if MessageFormat was FULL_CONTENT or PLAIN_TEXT."
},
"originalMessageId": {
"type": "string",
"readOnly": true,
"description": "Optional. Output only. The unique identifier of the original message that was forwarded. Only populated for forwarded messages."
}
},
"description": "Message within a thread."
},
"AttachmentMetadata": {
"type": "object",
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Output only. The ID of the attachment."
},
"partId": {
"type": "string",
"readOnly": true,
"description": "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\")."
},
"filename": {
"type": "string",
"description": "The filename of the attachment."
},
"mimeType": {
"type": "string",
"description": "The MIME type of the attachment."
}
},
"description": "Represents an attachment associated with a message."
}
},
"properties": {
"threads": {
"type": "array",
"items": {
"$ref": "#/$defs/Thread"
},
"description": "List of thread summaries."
},
"nextPageToken": {
"type": "string",
"description": "A token that can be used in a subsequent call to retrieve the next page of threads. Present only if there are more results. If the number of threads matching the query exceeds the `page_size` limit, the response will contain a `next_page_token`. To retrieve the next page of results, pass this token in the `page_token` field of the next `SearchThreadsRequest`."
},
"resultCountEstimate": {
"type": "string",
"format": "int64",
"description": "The estimated result count for this query. It should be treated as a lower bound, so for example if it is 500, then the count can be reported to the user as \"500+\"."
}
},
"description": "Response message for SearchThreads RPC."
},
"annotations": {
"title": "Search email threads",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description96/100
Adds labels to an entire thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread and any future messages added to it.
If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs. To move a thread to a different inbox category tab, add the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary); Gmail automatically removes the previous category. To move a thread to Trash or mark it as Spam, please use the `trash_thread` or `mark_thread_spam` tool instead.
The description explains the capability, when to use it, and what to expect.
Inputs75/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
labelIds
Required. The unique identifiers of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
Clear enough to supply this argument.
threadId
Required. The unique identifier of the thread to add labels to.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "label_thread",
"description": "Adds labels to an entire thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread and any future messages added to it.\n\nIf unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs. To move a thread to a different inbox category tab, add the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary); Gmail automatically removes the previous category. To move a thread to Trash or mark it as Spam, please use the `trash_thread` or `mark_thread_spam` tool instead.\n",
"inputSchema": {
"type": "object",
"required": [
"threadId",
"labelIds"
],
"properties": {
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required. The unique identifiers of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels."
},
"threadId": {
"type": "string",
"description": "Required. The unique identifier of the thread to add labels to."
}
},
"description": "Request message for LabelThread RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for LabelThread RPC."
},
"annotations": {
"title": "Add labels to thread",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description94/100
Removes labels from an entire thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread.
Use `unlabel_thread` when removing labels from an email or thread (such as marking it as read by removing `UNREAD`, archiving it by removing `INBOX`, or removing user-defined labels), even if the thread currently contains only 1 message. If unsure of a user label's ID, use the `list_labels` tool first.
The description explains the capability, when to use it, and what to expect.
Inputs75/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
labelIds
Required. The unique identifiers of the labels to remove. Can be a system label ID (e.g., `INBOX`, `TRASH`, `SPAM`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
Clear enough to supply this argument.
threadId
Required. The unique identifier of the thread to remove labels from.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "unlabel_thread",
"description": "Removes labels from an entire thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread.\n\nUse `unlabel_thread` when removing labels from an email or thread (such as marking it as read by removing `UNREAD`, archiving it by removing `INBOX`, or removing user-defined labels), even if the thread currently contains only 1 message. If unsure of a user label's ID, use the `list_labels` tool first.\n",
"inputSchema": {
"type": "object",
"required": [
"threadId",
"labelIds"
],
"properties": {
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required. The unique identifiers of the labels to remove. Can be a system label ID (e.g., `INBOX`, `TRASH`, `SPAM`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels."
},
"threadId": {
"type": "string",
"description": "Required. The unique identifier of the thread to remove labels from."
}
},
"description": "Request message for UnlabelThread RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for UnlabelThread RPC."
},
"annotations": {
"title": "Remove labels from thread",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description78/100
Prefer `trash_thread` or `mark_thread_spam` instead.
Adds a sensitive label (Trash or Spam) to a single thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread.
Use `apply_sensitive_thread_label` when applying Trash or Spam to exactly 1 thread. To apply sensitive labels to multiple threads, use `batch_apply_sensitive_thread_labels` instead.
The description explains the capability, when to use it, and what to expect.
Inputs63/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
labelOption
Required. The sensitive label option to add.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
threadId
Required. The ID of the thread to add the label to.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
Annotations100/100
All four behavior hints are declared.
{
"title": "Apply sensitive label (Trash or Spam) to thread",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
Output schema11/100
Declare the result fields and their types in the output schema.
{
"name": "apply_sensitive_thread_label",
"description": "Prefer `trash_thread` or `mark_thread_spam` instead.\n\nAdds a sensitive label (Trash or Spam) to a single thread in the authenticated user's Gmail account. This operation affects all messages currently in the thread.\n\nUse `apply_sensitive_thread_label` when applying Trash or Spam to exactly 1 thread. To apply sensitive labels to multiple threads, use `batch_apply_sensitive_thread_labels` instead.\n",
"inputSchema": {
"type": "object",
"required": [
"threadId",
"labelOption"
],
"properties": {
"threadId": {
"type": "string",
"description": "Required. The ID of the thread to add the label to."
},
"labelOption": {
"enum": [
"LABEL_OPTION_UNSPECIFIED",
"TRASH",
"SPAM"
],
"type": "string",
"description": "Required. The sensitive label option to add.",
"x-google-enum-descriptions": [
"Unspecified label option.",
"Trash label.",
"Spam label."
]
}
},
"description": "Request message for ApplySensitiveThreadLabel RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for ApplySensitiveThreadLabel RPC."
},
"annotations": {
"title": "Apply sensitive label (Trash or Spam) to thread",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description97/100
Moves an entire thread to the Trash (soft delete) in the authenticated user's Gmail account. This operation affects all messages currently in the thread.
This is the default tool (along with `trash_message`) when a user asks to 'delete', 'remove', or 'get rid of' an email or thread without explicitly requesting permanent, irreversible deletion. Use `trash_thread` when trashing a thread, even if it currently contains only 1 message. Trashing at the thread level ensures all current messages in the thread are moved to Trash.
The description explains the capability, when to use it, and what to expect.
Inputs50/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
threadId
Required. The ID of the thread to move to Trash.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "trash_thread",
"description": "Moves an entire thread to the Trash (soft delete) in the authenticated user's Gmail account. This operation affects all messages currently in the thread.\n\nThis is the default tool (along with `trash_message`) when a user asks to 'delete', 'remove', or 'get rid of' an email or thread without explicitly requesting permanent, irreversible deletion. Use `trash_thread` when trashing a thread, even if it currently contains only 1 message. Trashing at the thread level ensures all current messages in the thread are moved to Trash.\n",
"inputSchema": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string",
"description": "Required. The ID of the thread to move to Trash."
}
},
"description": "Request message for TrashThread RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for TrashThread RPC."
},
"annotations": {
"title": "Move thread to Trash",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description97/100
Marks an entire thread as Spam in the authenticated user's Gmail account. This operation affects all messages currently in the thread.
Use `mark_thread_spam` when marking a thread as spam, even if it currently contains only 1 message. Marking spam at the thread level ensures all current messages in the thread are marked as Spam.
Explain mutations, irreversible effects, or prerequisites that matter before calling this tool.
Inputs50/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
threadId
Required. The ID of the thread to mark as Spam.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "mark_thread_spam",
"description": "Marks an entire thread as Spam in the authenticated user's Gmail account. This operation affects all messages currently in the thread.\n\nUse `mark_thread_spam` when marking a thread as spam, even if it currently contains only 1 message. Marking spam at the thread level ensures all current messages in the thread are marked as Spam.\n",
"inputSchema": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string",
"description": "Required. The ID of the thread to mark as Spam."
}
},
"description": "Request message for MarkThreadSpam RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for MarkThreadSpam RPC."
},
"annotations": {
"title": "Mark thread as Spam",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description92/100
Lists all labels available in the authenticated user's Gmail account. Use this tool to discover the `id` of a label before calling `label_thread`, `unlabel_thread`, `label_message`, or `unlabel_message`. Note: the system labels, `DRAFT` and `SENT`, cannot be set on messages and are read only.
Inbox category tabs are represented by system labels: `CATEGORY_PERSONAL` (Primary), `CATEGORY_SOCIAL` (Social), `CATEGORY_PROMOTIONS` (Promotions), `CATEGORY_UPDATES` (Updates), and `CATEGORY_FORUMS` (Forums). A message has at most one category: adding a category label moves the message to that tab and automatically removes its previous category, and removing a category label without adding another moves the message to Primary.
Note: An empty JSON object `{}` represents zero matching items, not an error.
The description explains the capability, when to use it, and what to expect.
Inputs100/100
This tool declares no inputs, so argument descriptions are not needed.
{
"type": "object",
"$defs": {
"Label": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The human-readable display name of the label."
},
"color": {
"$ref": "#/$defs/LabelColor",
"deprecated": true,
"description": "Deprecated: Do not use. Use `color_preset` instead. Legacy field for raw text and background color hex strings."
},
"labelId": {
"type": "string",
"description": "The unique identifier of the label."
},
"labelType": {
"enum": [
"LABEL_TYPE_UNSPECIFIED",
"SYSTEM",
"USER"
],
"type": "string",
"description": "Optional. The type of the label (system or user-defined).",
"x-google-enum-descriptions": [
"Unspecified label type.",
"Labels created by Gmail.",
"Custom labels created by the user or application."
]
},
"colorPreset": {
"enum": [
"LABEL_COLOR_PRESET_UNSPECIFIED",
"LABEL_COLOR_PRESET_BLACK",
"LABEL_COLOR_PRESET_DARK_GRAY",
"LABEL_COLOR_PRESET_GRAY",
"LABEL_COLOR_PRESET_LIGHT_GRAY",
"LABEL_COLOR_PRESET_WHITE",
"LABEL_COLOR_PRESET_RED",
"LABEL_COLOR_PRESET_ORANGE",
"LABEL_COLOR_PRESET_YELLOW",
"LABEL_COLOR_PRESET_GREEN",
"LABEL_COLOR_PRESET_MINT",
"LABEL_COLOR_PRESET_TEAL",
"LABEL_COLOR_PRESET_BLUE",
"LABEL_COLOR_PRESET_PURPLE",
"LABEL_COLOR_PRESET_PINK",
"LABEL_COLOR_PRESET_DARK_RED",
"LABEL_COLOR_PRESET_DARK_ORANGE",
"LABEL_COLOR_PRESET_DARK_GREEN",
"LABEL_COLOR_PRESET_DARK_BLUE",
"LABEL_COLOR_PRESET_DARK_PURPLE",
"LABEL_COLOR_PRESET_DARK_PINK",
"LABEL_COLOR_PRESET_BROWN"
],
"type": "string",
"description": "Optional. The color preset tile assigned to the label (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE). Represents a pre-configured contrast-safe text and background color pair from the Gmail UI color palette. Returns LABEL_COLOR_PRESET_UNSPECIFIED if the label has a custom hex color.",
"x-google-enum-descriptions": [
"Default unspecified label color preset.",
"Black label color tile (#000000 background with #ffffff text).",
"Dark Gray label color tile (#434343 background with #ffffff text).",
"Gray label color tile (#666666 background with #ffffff text).",
"Light Gray label color tile (#cccccc background with #000000 text).",
"White label color tile (#ffffff background with #000000 text).",
"Red label color tile (#fb4c2f background with #ffffff text).",
"Orange label color tile (#ffad47 background with #000000 text).",
"Yellow label color tile (#fad165 background with #000000 text).",
"Green label color tile (#16a765 background with #ffffff text).",
"Mint label color tile (#43d692 background with #000000 text).",
"Teal label color tile (#2da2bb background with #ffffff text).",
"Blue label color tile (#4a86e8 background with #ffffff text).",
"Purple label color tile (#a479e2 background with #ffffff text).",
"Pink label color tile (#f691b2 background with #000000 text).",
"Dark Red label color tile (#822111 background with #ffffff text).",
"Dark Orange label color tile (#a46a21 background with #ffffff text).",
"Dark Green label color tile (#076239 background with #ffffff text).",
"Dark Blue label color tile (#1c4587 background with #ffffff text).",
"Dark Purple label color tile (#41236d background with #ffffff text).",
"Dark Pink label color tile (#83334c background with #ffffff text).",
"Brown label color tile (#7a4706 background with #ffffff text)."
]
},
"threadsTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of threads under the label."
},
"messagesTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of messages under the label."
},
"threadsUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread threads under the label."
},
"messagesUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread messages under the label."
},
"labelListVisibility": {
"enum": [
"LABEL_LIST_VISIBILITY_UNSPECIFIED",
"LABEL_SHOW",
"LABEL_SHOW_IF_UNREAD",
"LABEL_HIDE"
],
"type": "string",
"description": "Optional. The visibility of the label in the label list.",
"x-google-enum-descriptions": [
"Unspecified label list visibility.",
"Show the label in the label list.",
"Show the label if there are any unread messages with that label.",
"Do not show the label in the label list."
]
},
"messageListVisibility": {
"enum": [
"MESSAGE_LIST_VISIBILITY_UNSPECIFIED",
"SHOW",
"HIDE"
],
"type": "string",
"description": "Optional. The visibility of messages with this label in the message list.",
"x-google-enum-descriptions": [
"Unspecified message list visibility.",
"Show the label in the message list.",
"Do not show the label in the message list."
]
}
},
"description": "Details of a label."
},
"LabelColor": {
"type": "object",
"properties": {
"textColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The text color of the label, specified as either a 6-digit hex string (e.g., `#ffffff`) or a supported color name."
},
"backgroundColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The background color of the label, specified as either a 6-digit hex string (e.g., `#000000`) or a supported color name."
}
},
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The color of the label."
}
},
"properties": {
"labels": {
"type": "array",
"items": {
"$ref": "#/$defs/Label"
},
"description": "List of all labels in the user's account."
}
},
"description": "Response message for ListLabels RPC."
}
Original tool metadata
{
"name": "list_labels",
"description": "Lists all labels available in the authenticated user's Gmail account. Use this tool to discover the `id` of a label before calling `label_thread`, `unlabel_thread`, `label_message`, or `unlabel_message`. Note: the system labels, `DRAFT` and `SENT`, cannot be set on messages and are read only.\n\nInbox category tabs are represented by system labels: `CATEGORY_PERSONAL` (Primary), `CATEGORY_SOCIAL` (Social), `CATEGORY_PROMOTIONS` (Promotions), `CATEGORY_UPDATES` (Updates), and `CATEGORY_FORUMS` (Forums). A message has at most one category: adding a category label moves the message to that tab and automatically removes its previous category, and removing a category label without adding another moves the message to Primary.\n\nNote: An empty JSON object `{}` represents zero matching items, not an error.\n",
"inputSchema": {
"type": "object",
"properties": {},
"description": "Request message for ListLabels RPC."
},
"outputSchema": {
"type": "object",
"$defs": {
"Label": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The human-readable display name of the label."
},
"color": {
"$ref": "#/$defs/LabelColor",
"deprecated": true,
"description": "Deprecated: Do not use. Use `color_preset` instead. Legacy field for raw text and background color hex strings."
},
"labelId": {
"type": "string",
"description": "The unique identifier of the label."
},
"labelType": {
"enum": [
"LABEL_TYPE_UNSPECIFIED",
"SYSTEM",
"USER"
],
"type": "string",
"description": "Optional. The type of the label (system or user-defined).",
"x-google-enum-descriptions": [
"Unspecified label type.",
"Labels created by Gmail.",
"Custom labels created by the user or application."
]
},
"colorPreset": {
"enum": [
"LABEL_COLOR_PRESET_UNSPECIFIED",
"LABEL_COLOR_PRESET_BLACK",
"LABEL_COLOR_PRESET_DARK_GRAY",
"LABEL_COLOR_PRESET_GRAY",
"LABEL_COLOR_PRESET_LIGHT_GRAY",
"LABEL_COLOR_PRESET_WHITE",
"LABEL_COLOR_PRESET_RED",
"LABEL_COLOR_PRESET_ORANGE",
"LABEL_COLOR_PRESET_YELLOW",
"LABEL_COLOR_PRESET_GREEN",
"LABEL_COLOR_PRESET_MINT",
"LABEL_COLOR_PRESET_TEAL",
"LABEL_COLOR_PRESET_BLUE",
"LABEL_COLOR_PRESET_PURPLE",
"LABEL_COLOR_PRESET_PINK",
"LABEL_COLOR_PRESET_DARK_RED",
"LABEL_COLOR_PRESET_DARK_ORANGE",
"LABEL_COLOR_PRESET_DARK_GREEN",
"LABEL_COLOR_PRESET_DARK_BLUE",
"LABEL_COLOR_PRESET_DARK_PURPLE",
"LABEL_COLOR_PRESET_DARK_PINK",
"LABEL_COLOR_PRESET_BROWN"
],
"type": "string",
"description": "Optional. The color preset tile assigned to the label (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE). Represents a pre-configured contrast-safe text and background color pair from the Gmail UI color palette. Returns LABEL_COLOR_PRESET_UNSPECIFIED if the label has a custom hex color.",
"x-google-enum-descriptions": [
"Default unspecified label color preset.",
"Black label color tile (#000000 background with #ffffff text).",
"Dark Gray label color tile (#434343 background with #ffffff text).",
"Gray label color tile (#666666 background with #ffffff text).",
"Light Gray label color tile (#cccccc background with #000000 text).",
"White label color tile (#ffffff background with #000000 text).",
"Red label color tile (#fb4c2f background with #ffffff text).",
"Orange label color tile (#ffad47 background with #000000 text).",
"Yellow label color tile (#fad165 background with #000000 text).",
"Green label color tile (#16a765 background with #ffffff text).",
"Mint label color tile (#43d692 background with #000000 text).",
"Teal label color tile (#2da2bb background with #ffffff text).",
"Blue label color tile (#4a86e8 background with #ffffff text).",
"Purple label color tile (#a479e2 background with #ffffff text).",
"Pink label color tile (#f691b2 background with #000000 text).",
"Dark Red label color tile (#822111 background with #ffffff text).",
"Dark Orange label color tile (#a46a21 background with #ffffff text).",
"Dark Green label color tile (#076239 background with #ffffff text).",
"Dark Blue label color tile (#1c4587 background with #ffffff text).",
"Dark Purple label color tile (#41236d background with #ffffff text).",
"Dark Pink label color tile (#83334c background with #ffffff text).",
"Brown label color tile (#7a4706 background with #ffffff text)."
]
},
"threadsTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of threads under the label."
},
"messagesTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of messages under the label."
},
"threadsUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread threads under the label."
},
"messagesUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread messages under the label."
},
"labelListVisibility": {
"enum": [
"LABEL_LIST_VISIBILITY_UNSPECIFIED",
"LABEL_SHOW",
"LABEL_SHOW_IF_UNREAD",
"LABEL_HIDE"
],
"type": "string",
"description": "Optional. The visibility of the label in the label list.",
"x-google-enum-descriptions": [
"Unspecified label list visibility.",
"Show the label in the label list.",
"Show the label if there are any unread messages with that label.",
"Do not show the label in the label list."
]
},
"messageListVisibility": {
"enum": [
"MESSAGE_LIST_VISIBILITY_UNSPECIFIED",
"SHOW",
"HIDE"
],
"type": "string",
"description": "Optional. The visibility of messages with this label in the message list.",
"x-google-enum-descriptions": [
"Unspecified message list visibility.",
"Show the label in the message list.",
"Do not show the label in the message list."
]
}
},
"description": "Details of a label."
},
"LabelColor": {
"type": "object",
"properties": {
"textColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The text color of the label, specified as either a 6-digit hex string (e.g., `#ffffff`) or a supported color name."
},
"backgroundColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The background color of the label, specified as either a 6-digit hex string (e.g., `#000000`) or a supported color name."
}
},
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The color of the label."
}
},
"properties": {
"labels": {
"type": "array",
"items": {
"$ref": "#/$defs/Label"
},
"description": "List of all labels in the user's account."
}
},
"description": "Response message for ListLabels RPC."
},
"annotations": {
"title": "List labels",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description89/100
Adds one or more labels to a specific message in the authenticated user's Gmail account.
To find the message ID, use the `get_thread` tool. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs.
To move a message to a different inbox category tab, add the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary); Gmail automatically removes the previous category.
To move a specific message to Trash or mark it as Spam, please use the `trash_message` or `mark_message_spam` tool instead.
The description explains the capability, when to use it, and what to expect.
Inputs75/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
labelIds
Required. The IDs of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
Clear enough to supply this argument.
messageId
Required. The ID of the message to add the labels to.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "label_message",
"description": "Adds one or more labels to a specific message in the authenticated user's Gmail account.\n\nTo find the message ID, use the `get_thread` tool. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs.\nTo move a message to a different inbox category tab, add the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary); Gmail automatically removes the previous category.\nTo move a specific message to Trash or mark it as Spam, please use the `trash_message` or `mark_message_spam` tool instead.\n",
"inputSchema": {
"type": "object",
"required": [
"messageId",
"labelIds"
],
"properties": {
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required. The IDs of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels."
},
"messageId": {
"type": "string",
"description": "Required. The ID of the message to add the labels to."
}
},
"description": "Request message for LabelMessage RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for LabelMessage RPC."
},
"annotations": {
"title": "Add labels to message",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description88/100
Atomically adds and/or removes labels from a specific message in the authenticated user's Gmail account.
Requires at least one of `addLabelIds` or `removeLabelIds` to be provided. Moving an email between labels can be accomplished in a single call by specifying the target label in `addLabelIds` and the current label in `removeLabelIds`.
For inbox category tabs, adding the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary) is sufficient; Gmail automatically removes the previous category.
The description explains the capability, when to use it, and what to expect.
Inputs82/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
addLabelIds
Optional. The IDs of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID.
Clear enough to supply this argument.
messageId
Required. The ID of the message to modify labels for.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
removeLabelIds
Optional. The IDs of the labels to remove. Can be a system label ID or a user-defined label ID.
{
"type": "object",
"properties": {
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The updated list of label IDs on the message."
},
"messageId": {
"type": "string",
"description": "The ID of the modified message."
}
},
"description": "Response message for UpdateMessageLabels RPC."
}
Original tool metadata
{
"name": "update_message_labels",
"description": "Atomically adds and/or removes labels from a specific message in the authenticated user's Gmail account.\n\nRequires at least one of `addLabelIds` or `removeLabelIds` to be provided. Moving an email between labels can be accomplished in a single call by specifying the target label in `addLabelIds` and the current label in `removeLabelIds`.\nFor inbox category tabs, adding the target `CATEGORY_*` label (e.g. `CATEGORY_PERSONAL` for Primary) is sufficient; Gmail automatically removes the previous category.\n",
"inputSchema": {
"type": "object",
"required": [
"messageId"
],
"properties": {
"messageId": {
"type": "string",
"description": "Required. The ID of the message to modify labels for."
},
"addLabelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The IDs of the labels to add. Can be a system label ID (e.g., `INBOX`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID."
},
"removeLabelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional. The IDs of the labels to remove. Can be a system label ID or a user-defined label ID."
}
},
"description": "Request message for UpdateMessageLabels RPC."
},
"outputSchema": {
"type": "object",
"properties": {
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The updated list of label IDs on the message."
},
"messageId": {
"type": "string",
"description": "The ID of the modified message."
}
},
"description": "Response message for UpdateMessageLabels RPC."
},
"annotations": {
"title": "Modify message labels",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description79/100
Removes one or more labels from a specific message in the authenticated user's Gmail account. To find the message ID, use the `get_thread` tool. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs.
The description explains the capability, when to use it, and what to expect.
Inputs75/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
labelIds
Required. The IDs of the labels to remove. Can be a system label ID (e.g., `INBOX`, `TRASH`, `SPAM`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels.
Clear enough to supply this argument.
messageId
Required. The ID of the message to remove the labels from.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "unlabel_message",
"description": "Removes one or more labels from a specific message in the authenticated user's Gmail account. To find the message ID, use the `get_thread` tool. If unsure of a user label's ID, use the `list_labels` tool first to discover available labels and their IDs.",
"inputSchema": {
"type": "object",
"required": [
"messageId",
"labelIds"
],
"properties": {
"labelIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Required. The IDs of the labels to remove. Can be a system label ID (e.g., `INBOX`, `TRASH`, `SPAM`, `STARRED`, `UNREAD`, `IMPORTANT`) or a user-defined label ID. The tool accepts `label_ids` and not label names. Use the `list_labels` tool to get the corresponding label id to a display name for user-defined labels."
},
"messageId": {
"type": "string",
"description": "Required. The ID of the message to remove the labels from."
}
},
"description": "Request message for UnlabelMessage RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for UnlabelMessage RPC."
},
"annotations": {
"title": "Remove labels from message",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description72/100
Prefer `trash_message` or `mark_message_spam` instead.
Adds a sensitive label (Trash or Spam) to a single message in the authenticated user's Gmail account.
Use `apply_sensitive_message_label` when applying Trash or Spam to exactly 1 message. To apply sensitive labels to multiple messages, use `batch_apply_sensitive_message_labels` instead. If the message belongs to a thread that should be labeled as a whole, prefer `trash_thread` or `mark_thread_spam`.
To find the message ID, use the `get_thread` tool. To find the draft message ID, use tools like `list_drafts`.
Resolve contradictions between the description, input schema, and annotations.
Inputs63/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
labelOption
Required. The sensitive label option to add.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
messageId
Required. The ID of the message to add the label to.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
Annotations100/100
All four behavior hints are declared.
{
"title": "Apply sensitive label (Trash or Spam) to message",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
Output schema15/100
Declare the result fields and their types in the output schema.
{
"name": "apply_sensitive_message_label",
"description": "Prefer `trash_message` or `mark_message_spam` instead.\n\nAdds a sensitive label (Trash or Spam) to a single message in the authenticated user's Gmail account.\n\nUse `apply_sensitive_message_label` when applying Trash or Spam to exactly 1 message. To apply sensitive labels to multiple messages, use `batch_apply_sensitive_message_labels` instead. If the message belongs to a thread that should be labeled as a whole, prefer `trash_thread` or `mark_thread_spam`.\n\nTo find the message ID, use the `get_thread` tool. To find the draft message ID, use tools like `list_drafts`.\n",
"inputSchema": {
"type": "object",
"required": [
"messageId",
"labelOption"
],
"properties": {
"messageId": {
"type": "string",
"description": "Required. The ID of the message to add the label to."
},
"labelOption": {
"enum": [
"LABEL_OPTION_UNSPECIFIED",
"TRASH",
"SPAM"
],
"type": "string",
"description": "Required. The sensitive label option to add.",
"x-google-enum-descriptions": [
"Unspecified label option.",
"Trash label.",
"Spam label."
]
}
},
"description": "Request message for ApplySensitiveMessageLabel RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for ApplySensitiveMessageLabel RPC."
},
"annotations": {
"title": "Apply sensitive label (Trash or Spam) to message",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description93/100
Moves a specific message to the Trash (soft delete) in the authenticated user's Gmail account.
This is the default tool (along with `trash_thread`) when a user asks to 'delete', 'remove', or 'get rid of' a message without explicitly requesting permanent, irreversible deletion. Use `trash_message` when targeting a specific message within a thread. To trash an entire thread or a single-message thread, prefer `trash_thread`.
To find the message ID, use the `get_thread` tool. To find the draft message ID, use tools like `list_drafts`.
The description explains the capability, when to use it, and what to expect.
Inputs50/100
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
messageId
Required. The ID of the message to move to Trash.
Clarify units, where to obtain this value, or conventions not already expressed in the schema.
{
"name": "trash_message",
"description": "Moves a specific message to the Trash (soft delete) in the authenticated user's Gmail account.\n\nThis is the default tool (along with `trash_thread`) when a user asks to 'delete', 'remove', or 'get rid of' a message without explicitly requesting permanent, irreversible deletion. Use `trash_message` when targeting a specific message within a thread. To trash an entire thread or a single-message thread, prefer `trash_thread`.\n\nTo find the message ID, use the `get_thread` tool. To find the draft message ID, use tools like `list_drafts`.\n",
"inputSchema": {
"type": "object",
"required": [
"messageId"
],
"properties": {
"messageId": {
"type": "string",
"description": "Required. The ID of the message to move to Trash."
}
},
"description": "Request message for TrashMessage RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for TrashMessage RPC."
},
"annotations": {
"title": "Move message to Trash",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
{
"name": "untrash_message",
"description": "Removes a specific message from the Trash in the authenticated user's Gmail account.\n\nTo find the message ID, use the `get_thread` tool.\n",
"inputSchema": {
"type": "object",
"required": [
"messageId"
],
"properties": {
"messageId": {
"type": "string",
"description": "Required. The ID of the message to remove from Trash."
}
},
"description": "Request message for UntrashMessage RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for UntrashMessage RPC."
},
"annotations": {
"title": "Remove message from Trash",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}
{
"name": "mark_message_spam",
"description": "Marks a specific message as Spam in the authenticated user's Gmail account.\n\nTo find the message ID, use the `get_thread` tool.\n",
"inputSchema": {
"type": "object",
"required": [
"messageId"
],
"properties": {
"messageId": {
"type": "string",
"description": "Required. The ID of the message to mark as Spam."
}
},
"description": "Request message for MarkMessageSpam RPC."
},
"outputSchema": {
"type": "object",
"properties": {},
"description": "Response message for MarkMessageSpam RPC."
},
"annotations": {
"title": "Mark message as Spam",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}
The title clearly communicates the tool’s action and subject. Keep it concise.
Description76/100
Creates a new label in the authenticated user's Gmail account.
Supports creating nested labels (sub-labels) using a forward slash (e.g., 'Projects/Alpha/Sprint-1').
By default, parent labels will be automatically created if they do not exist.
The description explains the capability, when to use it, and what to expect.
Inputs96/100
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
autoCreateParentLabels
Optional. Whether to automatically create parent labels for nested labels (separated by `/`). Defaults to `true`. When set to `true`, missing parent labels in the hierarchy (e.g., `Projects` and `Projects/Alpha` for `Projects/Alpha/Sprint-1`) are created automatically. When set to `false`, parent label auto-creation is disabled.
Clear enough to supply this argument.
$defs › LabelColor › backgroundColor
Deprecated: Do not use. Use `LabelColorPreset` instead. The background color of the label, specified as either a 6-digit hex string (e.g., `#000000`) or a supported color name.
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
$defs › LabelColor › textColor
Deprecated: Do not use. Use `LabelColorPreset` instead. The text color of the label, specified as either a 6-digit hex string (e.g., `#ffffff`) or a supported color name.
Clear enough to supply this argument.
colorPreset
Optional. The color preset tile to assign to the new label. Select from predefined contrast-safe color options (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE, LABEL_COLOR_PRESET_BLACK, LABEL_COLOR_PRESET_GREEN). If omitted, default label styling is applied.
Clear enough to supply this argument.
displayName
Required. The display name of the label to create. Supports nested label hierarchy using `/` (e.g., `Projects/Alpha/Sprint-1`).
Clear enough to supply this argument.
labelListVisibility
Optional. The visibility of the label in the label list in the Gmail web interface. Defaults to `LABEL_SHOW`.
Clear enough to supply this argument.
messageListVisibility
Optional. The visibility of messages with this label in the message list in the Gmail web interface. Defaults to `SHOW`.
{
"type": "object",
"$defs": {
"LabelColor": {
"type": "object",
"properties": {
"textColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The text color of the label, specified as either a 6-digit hex string (e.g., `#ffffff`) or a supported color name."
},
"backgroundColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The background color of the label, specified as either a 6-digit hex string (e.g., `#000000`) or a supported color name."
}
},
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The color of the label."
}
},
"properties": {
"name": {
"type": "string",
"description": "The human-readable display name of the label."
},
"color": {
"$ref": "#/$defs/LabelColor",
"deprecated": true,
"description": "Deprecated: Do not use. Use `color_preset` instead. Legacy field for raw text and background color hex strings."
},
"labelId": {
"type": "string",
"description": "The unique identifier of the label."
},
"labelType": {
"enum": [
"LABEL_TYPE_UNSPECIFIED",
"SYSTEM",
"USER"
],
"type": "string",
"description": "Optional. The type of the label (system or user-defined).",
"x-google-enum-descriptions": [
"Unspecified label type.",
"Labels created by Gmail.",
"Custom labels created by the user or application."
]
},
"colorPreset": {
"enum": [
"LABEL_COLOR_PRESET_UNSPECIFIED",
"LABEL_COLOR_PRESET_BLACK",
"LABEL_COLOR_PRESET_DARK_GRAY",
"LABEL_COLOR_PRESET_GRAY",
"LABEL_COLOR_PRESET_LIGHT_GRAY",
"LABEL_COLOR_PRESET_WHITE",
"LABEL_COLOR_PRESET_RED",
"LABEL_COLOR_PRESET_ORANGE",
"LABEL_COLOR_PRESET_YELLOW",
"LABEL_COLOR_PRESET_GREEN",
"LABEL_COLOR_PRESET_MINT",
"LABEL_COLOR_PRESET_TEAL",
"LABEL_COLOR_PRESET_BLUE",
"LABEL_COLOR_PRESET_PURPLE",
"LABEL_COLOR_PRESET_PINK",
"LABEL_COLOR_PRESET_DARK_RED",
"LABEL_COLOR_PRESET_DARK_ORANGE",
"LABEL_COLOR_PRESET_DARK_GREEN",
"LABEL_COLOR_PRESET_DARK_BLUE",
"LABEL_COLOR_PRESET_DARK_PURPLE",
"LABEL_COLOR_PRESET_DARK_PINK",
"LABEL_COLOR_PRESET_BROWN"
],
"type": "string",
"description": "Optional. The color preset tile assigned to the label (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE). Represents a pre-configured contrast-safe text and background color pair from the Gmail UI color palette. Returns LABEL_COLOR_PRESET_UNSPECIFIED if the label has a custom hex color.",
"x-google-enum-descriptions": [
"Default unspecified label color preset.",
"Black label color tile (#000000 background with #ffffff text).",
"Dark Gray label color tile (#434343 background with #ffffff text).",
"Gray label color tile (#666666 background with #ffffff text).",
"Light Gray label color tile (#cccccc background with #000000 text).",
"White label color tile (#ffffff background with #000000 text).",
"Red label color tile (#fb4c2f background with #ffffff text).",
"Orange label color tile (#ffad47 background with #000000 text).",
"Yellow label color tile (#fad165 background with #000000 text).",
"Green label color tile (#16a765 background with #ffffff text).",
"Mint label color tile (#43d692 background with #000000 text).",
"Teal label color tile (#2da2bb background with #ffffff text).",
"Blue label color tile (#4a86e8 background with #ffffff text).",
"Purple label color tile (#a479e2 background with #ffffff text).",
"Pink label color tile (#f691b2 background with #000000 text).",
"Dark Red label color tile (#822111 background with #ffffff text).",
"Dark Orange label color tile (#a46a21 background with #ffffff text).",
"Dark Green label color tile (#076239 background with #ffffff text).",
"Dark Blue label color tile (#1c4587 background with #ffffff text).",
"Dark Purple label color tile (#41236d background with #ffffff text).",
"Dark Pink label color tile (#83334c background with #ffffff text).",
"Brown label color tile (#7a4706 background with #ffffff text)."
]
},
"threadsTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of threads under the label."
},
"messagesTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of messages under the label."
},
"threadsUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread threads under the label."
},
"messagesUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread messages under the label."
},
"labelListVisibility": {
"enum": [
"LABEL_LIST_VISIBILITY_UNSPECIFIED",
"LABEL_SHOW",
"LABEL_SHOW_IF_UNREAD",
"LABEL_HIDE"
],
"type": "string",
"description": "Optional. The visibility of the label in the label list.",
"x-google-enum-descriptions": [
"Unspecified label list visibility.",
"Show the label in the label list.",
"Show the label if there are any unread messages with that label.",
"Do not show the label in the label list."
]
},
"messageListVisibility": {
"enum": [
"MESSAGE_LIST_VISIBILITY_UNSPECIFIED",
"SHOW",
"HIDE"
],
"type": "string",
"description": "Optional. The visibility of messages with this label in the message list.",
"x-google-enum-descriptions": [
"Unspecified message list visibility.",
"Show the label in the message list.",
"Do not show the label in the message list."
]
}
},
"description": "Details of a label."
}
Original tool metadata
{
"name": "create_label",
"description": "Creates a new label in the authenticated user's Gmail account.\nSupports creating nested labels (sub-labels) using a forward slash (e.g., 'Projects/Alpha/Sprint-1').\nBy default, parent labels will be automatically created if they do not exist.\n",
"inputSchema": {
"type": "object",
"$defs": {
"LabelColor": {
"type": "object",
"properties": {
"textColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The text color of the label, specified as either a 6-digit hex string (e.g., `#ffffff`) or a supported color name."
},
"backgroundColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The background color of the label, specified as either a 6-digit hex string (e.g., `#000000`) or a supported color name."
}
},
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The color of the label."
}
},
"required": [
"displayName"
],
"properties": {
"color": {
"$ref": "#/$defs/LabelColor",
"deprecated": true,
"description": "Deprecated: Do not use. Use `color_preset` instead. Legacy field for raw text and background color hex strings."
},
"colorPreset": {
"enum": [
"LABEL_COLOR_PRESET_UNSPECIFIED",
"LABEL_COLOR_PRESET_BLACK",
"LABEL_COLOR_PRESET_DARK_GRAY",
"LABEL_COLOR_PRESET_GRAY",
"LABEL_COLOR_PRESET_LIGHT_GRAY",
"LABEL_COLOR_PRESET_WHITE",
"LABEL_COLOR_PRESET_RED",
"LABEL_COLOR_PRESET_ORANGE",
"LABEL_COLOR_PRESET_YELLOW",
"LABEL_COLOR_PRESET_GREEN",
"LABEL_COLOR_PRESET_MINT",
"LABEL_COLOR_PRESET_TEAL",
"LABEL_COLOR_PRESET_BLUE",
"LABEL_COLOR_PRESET_PURPLE",
"LABEL_COLOR_PRESET_PINK",
"LABEL_COLOR_PRESET_DARK_RED",
"LABEL_COLOR_PRESET_DARK_ORANGE",
"LABEL_COLOR_PRESET_DARK_GREEN",
"LABEL_COLOR_PRESET_DARK_BLUE",
"LABEL_COLOR_PRESET_DARK_PURPLE",
"LABEL_COLOR_PRESET_DARK_PINK",
"LABEL_COLOR_PRESET_BROWN"
],
"type": "string",
"description": "Optional. The color preset tile to assign to the new label. Select from predefined contrast-safe color options (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE, LABEL_COLOR_PRESET_BLACK, LABEL_COLOR_PRESET_GREEN). If omitted, default label styling is applied.",
"x-google-enum-descriptions": [
"Default unspecified label color preset.",
"Black label color tile (#000000 background with #ffffff text).",
"Dark Gray label color tile (#434343 background with #ffffff text).",
"Gray label color tile (#666666 background with #ffffff text).",
"Light Gray label color tile (#cccccc background with #000000 text).",
"White label color tile (#ffffff background with #000000 text).",
"Red label color tile (#fb4c2f background with #ffffff text).",
"Orange label color tile (#ffad47 background with #000000 text).",
"Yellow label color tile (#fad165 background with #000000 text).",
"Green label color tile (#16a765 background with #ffffff text).",
"Mint label color tile (#43d692 background with #000000 text).",
"Teal label color tile (#2da2bb background with #ffffff text).",
"Blue label color tile (#4a86e8 background with #ffffff text).",
"Purple label color tile (#a479e2 background with #ffffff text).",
"Pink label color tile (#f691b2 background with #000000 text).",
"Dark Red label color tile (#822111 background with #ffffff text).",
"Dark Orange label color tile (#a46a21 background with #ffffff text).",
"Dark Green label color tile (#076239 background with #ffffff text).",
"Dark Blue label color tile (#1c4587 background with #ffffff text).",
"Dark Purple label color tile (#41236d background with #ffffff text).",
"Dark Pink label color tile (#83334c background with #ffffff text).",
"Brown label color tile (#7a4706 background with #ffffff text)."
]
},
"displayName": {
"type": "string",
"description": "Required. The display name of the label to create. Supports nested label hierarchy using `/` (e.g., `Projects/Alpha/Sprint-1`)."
},
"labelListVisibility": {
"enum": [
"LABEL_LIST_VISIBILITY_UNSPECIFIED",
"LABEL_SHOW",
"LABEL_SHOW_IF_UNREAD",
"LABEL_HIDE"
],
"type": "string",
"description": "Optional. The visibility of the label in the label list in the Gmail web interface. Defaults to `LABEL_SHOW`.",
"x-google-enum-descriptions": [
"Unspecified label list visibility.",
"Show the label in the label list.",
"Show the label if there are any unread messages with that label.",
"Do not show the label in the label list."
]
},
"messageListVisibility": {
"enum": [
"MESSAGE_LIST_VISIBILITY_UNSPECIFIED",
"SHOW",
"HIDE"
],
"type": "string",
"description": "Optional. The visibility of messages with this label in the message list in the Gmail web interface. Defaults to `SHOW`.",
"x-google-enum-descriptions": [
"Unspecified message list visibility.",
"Show the label in the message list.",
"Do not show the label in the message list."
]
},
"autoCreateParentLabels": {
"type": "boolean",
"description": "Optional. Whether to automatically create parent labels for nested labels (separated by `/`). Defaults to `true`. When set to `true`, missing parent labels in the hierarchy (e.g., `Projects` and `Projects/Alpha` for `Projects/Alpha/Sprint-1`) are created automatically. When set to `false`, parent label auto-creation is disabled."
}
},
"description": "Request message for CreateLabel RPC."
},
"outputSchema": {
"type": "object",
"$defs": {
"LabelColor": {
"type": "object",
"properties": {
"textColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The text color of the label, specified as either a 6-digit hex string (e.g., `#ffffff`) or a supported color name."
},
"backgroundColor": {
"type": "string",
"deprecated": true,
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The background color of the label, specified as either a 6-digit hex string (e.g., `#000000`) or a supported color name."
}
},
"description": "Deprecated: Do not use. Use `LabelColorPreset` instead. The color of the label."
}
},
"properties": {
"name": {
"type": "string",
"description": "The human-readable display name of the label."
},
"color": {
"$ref": "#/$defs/LabelColor",
"deprecated": true,
"description": "Deprecated: Do not use. Use `color_preset` instead. Legacy field for raw text and background color hex strings."
},
"labelId": {
"type": "string",
"description": "The unique identifier of the label."
},
"labelType": {
"enum": [
"LABEL_TYPE_UNSPECIFIED",
"SYSTEM",
"USER"
],
"type": "string",
"description": "Optional. The type of the label (system or user-defined).",
"x-google-enum-descriptions": [
"Unspecified label type.",
"Labels created by Gmail.",
"Custom labels created by the user or application."
]
},
"colorPreset": {
"enum": [
"LABEL_COLOR_PRESET_UNSPECIFIED",
"LABEL_COLOR_PRESET_BLACK",
"LABEL_COLOR_PRESET_DARK_GRAY",
"LABEL_COLOR_PRESET_GRAY",
"LABEL_COLOR_PRESET_LIGHT_GRAY",
"LABEL_COLOR_PRESET_WHITE",
"LABEL_COLOR_PRESET_RED",
"LABEL_COLOR_PRESET_ORANGE",
"LABEL_COLOR_PRESET_YELLOW",
"LABEL_COLOR_PRESET_GREEN",
"LABEL_COLOR_PRESET_MINT",
"LABEL_COLOR_PRESET_TEAL",
"LABEL_COLOR_PRESET_BLUE",
"LABEL_COLOR_PRESET_PURPLE",
"LABEL_COLOR_PRESET_PINK",
"LABEL_COLOR_PRESET_DARK_RED",
"LABEL_COLOR_PRESET_DARK_ORANGE",
"LABEL_COLOR_PRESET_DARK_GREEN",
"LABEL_COLOR_PRESET_DARK_BLUE",
"LABEL_COLOR_PRESET_DARK_PURPLE",
"LABEL_COLOR_PRESET_DARK_PINK",
"LABEL_COLOR_PRESET_BROWN"
],
"type": "string",
"description": "Optional. The color preset tile assigned to the label (e.g., LABEL_COLOR_PRESET_RED, LABEL_COLOR_PRESET_BLUE). Represents a pre-configured contrast-safe text and background color pair from the Gmail UI color palette. Returns LABEL_COLOR_PRESET_UNSPECIFIED if the label has a custom hex color.",
"x-google-enum-descriptions": [
"Default unspecified label color preset.",
"Black label color tile (#000000 background with #ffffff text).",
"Dark Gray label color tile (#434343 background with #ffffff text).",
"Gray label color tile (#666666 background with #ffffff text).",
"Light Gray label color tile (#cccccc background with #000000 text).",
"White label color tile (#ffffff background with #000000 text).",
"Red label color tile (#fb4c2f background with #ffffff text).",
"Orange label color tile (#ffad47 background with #000000 text).",
"Yellow label color tile (#fad165 background with #000000 text).",
"Green label color tile (#16a765 background with #ffffff text).",
"Mint label color tile (#43d692 background with #000000 text).",
"Teal label color tile (#2da2bb background with #ffffff text).",
"Blue label color tile (#4a86e8 background with #ffffff text).",
"Purple label color tile (#a479e2 background with #ffffff text).",
"Pink label color tile (#f691b2 background with #000000 text).",
"Dark Red label color tile (#822111 background with #ffffff text).",
"Dark Orange label color tile (#a46a21 background with #ffffff text).",
"Dark Green label color tile (#076239 background with #ffffff text).",
"Dark Blue label color tile (#1c4587 background with #ffffff text).",
"Dark Purple label color tile (#41236d background with #ffffff text).",
"Dark Pink label color tile (#83334c background with #ffffff text).",
"Brown label color tile (#7a4706 background with #ffffff text)."
]
},
"threadsTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of threads under the label."
},
"messagesTotal": {
"type": "integer",
"format": "int32",
"description": "The total number of messages under the label."
},
"threadsUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread threads under the label."
},
"messagesUnread": {
"type": "integer",
"format": "int32",
"description": "The number of unread messages under the label."
},
"labelListVisibility": {
"enum": [
"LABEL_LIST_VISIBILITY_UNSPECIFIED",
"LABEL_SHOW",
"LABEL_SHOW_IF_UNREAD",
"LABEL_HIDE"
],
"type": "string",
"description": "Optional. The visibility of the label in the label list.",
"x-google-enum-descriptions": [
"Unspecified label list visibility.",
"Show the label in the label list.",
"Show the label if there are any unread messages with that label.",
"Do not show the label in the label list."
]
},
"messageListVisibility": {
"enum": [
"MESSAGE_LIST_VISIBILITY_UNSPECIFIED",
"SHOW",
"HIDE"
],
"type": "string",
"description": "Optional. The visibility of messages with this label in the message list.",
"x-google-enum-descriptions": [
"Unspecified message list visibility.",
"Show the label in the message list.",
"Do not show the label in the message list."
]
}
},
"description": "Details of a label."
},
"annotations": {
"title": "Create label",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}
Loading score analytics…
Put your MCP to the test
A few tasks worth trying with this server, chosen from its reviewed tools. These have not been run.
01Search email threadsLists email threads from the authenticated user's Gmail account.
02List labelsLists all labels available in the authenticated user's Gmail account.
03Get email threadRetrieves a specific email thread from the authenticated user's Gmail account, including its `viewUrl` and a list of its messages (each with their own `viewU…
04Get email messageRetrieves a specific email message from the authenticated user's Gmail account by its unique message ID, including its `viewUrl`.
05List draft emailsLists draft emails from the authenticated user's Gmail account, optionally filtered by a query string.
Want to run these tasks against your MCP server with us?
gmailmcp setup, tools, quality score, publishing readiness, and alternatives.
How do I add gmailmcp to Claude, ChatGPT, or Cursor?
Add gmailmcp to Claude, ChatGPT, or Cursor by connecting its remote MCP URL in each client's MCP settings. In Claude, add a custom connector. In ChatGPT, add an MCP app. In Cursor, add an MCP server under Settings. The MCP URL is https://gmailmcp.googleapis.com/mcp/v1.
Is gmailmcp MCP ready for ChatGPT and Claude?
As of October 24, 2026, gmailmcp scores 96/100 on Manufact's MCP publishing checklist. The scan meets ChatGPT publishing checks and meets Claude publishing checks. Passing these checks does not guarantee marketplace approval.
How clear is gmailmcp's MCP tool documentation?
As of October 24, 2026, gmailmcp scores 82/100 in Manufact's review of tool titles, descriptions, input and output schemas, and behavior annotations. The review covers 23 of 23 discovered tools. The quality score measures documentation clarity; runtime behavior and marketplace readiness require separate checks.
What are the best alternatives to gmailmcp?
As of December 4, 2026, alternatives to gmailmcp in communication on the Manufact MCP leaderboard include Granola, Cooper Email, Primitive Email, Dial, and Hail.
How can gmailmcp improve its MCP documentation?
mark_message_spam is the lowest-scoring reviewed tool at 72/100. Declare the result fields and their types in the output schema. Open its review for feedback and a copyable fix prompt, then rerun the documentation review after updating your tool metadata.
Not your MCP?
Review any public or OAuth MCP server for protocol compatibility, tool documentation, and ChatGPT and Claude publishing readiness. No account required.