Gmail MCP

by shinzo-labs
Verified
MIT License
126
1
  • Apple
  • Linux

list_messages

Retrieve and filter messages from a Gmail mailbox using optional parameters like label IDs, search queries, and result limits. Supports inclusion of spam/trash messages and HTML body content.

Instructions

List messages in the user's mailbox with optional filtering

Input Schema

NameRequiredDescriptionDefault
includeBodyHtmlNoWhether to include the parsed HTML in the return for each body, excluded by default because they can be excessively large
includeSpamTrashNoInclude messages from SPAM and TRASH in the results
labelIdsNoOnly return messages with labels that match all of the specified label IDs
maxResultsNoMaximum number of messages to return. Accepts values between 1-500
pageTokenNoPage token to retrieve a specific page of results
qNoOnly return messages matching the specified query. Supports the same query format as the Gmail search box

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "includeBodyHtml": { "description": "Whether to include the parsed HTML in the return for each body, excluded by default because they can be excessively large", "type": "boolean" }, "includeSpamTrash": { "description": "Include messages from SPAM and TRASH in the results", "type": "boolean" }, "labelIds": { "description": "Only return messages with labels that match all of the specified label IDs", "items": { "type": "string" }, "type": "array" }, "maxResults": { "description": "Maximum number of messages to return. Accepts values between 1-500", "type": "number" }, "pageToken": { "description": "Page token to retrieve a specific page of results", "type": "string" }, "q": { "description": "Only return messages matching the specified query. Supports the same query format as the Gmail search box", "type": "string" } }, "type": "object" }
ID: 1je9b8hapn