Gmail search emails

gmail__search_emails

Access

Requires a project integration connection for gmail.

Call type: Can read or manage credentials.

Arguments

FieldTypeRequiredDescription and constraints
qstringYesGmail search expression; use an empty string for date-only searches. For local dates use dateFrom, dateTo and timeZone instead of date operators.
maxResultsnumberNoMaximum number of message summaries to return (1-50)
pageTokenstringNoPage token for pagination
dateFromstringNoLocal start date, inclusive (YYYY-MM-DD). Use with dateTo and timeZone for date-based searches.
dateTostringNoLocal end date, exclusive (YYYY-MM-DD). For one day, use the following date.
timeZonestringNoIANA timezone for the local date range, e.g. Europe/Berlin.

Example request

Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "gmail__search_emails",
    "arguments": {
      "q": "example"
    }
  }
}

Result

No output schema is published for this tool. The input contract does not define its return fields. Inspect the MCP response content and isError; do not assume a fixed object shape. See the gmail integration reference for provider setup and tool context.

Full schemas

json
{
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "description": "Gmail search expression; use an empty string for date-only searches. For local dates use dateFrom, dateTo and timeZone instead of date operators."
    },
    "maxResults": {
      "type": "number",
      "description": "Maximum number of message summaries to return (1-50)"
    },
    "pageToken": {
      "type": "string",
      "description": "Page token for pagination"
    },
    "dateFrom": {
      "type": "string",
      "description": "Local start date, inclusive (YYYY-MM-DD). Use with dateTo and timeZone for date-based searches."
    },
    "dateTo": {
      "type": "string",
      "description": "Local end date, exclusive (YYYY-MM-DD). For one day, use the following date."
    },
    "timeZone": {
      "type": "string",
      "description": "IANA timezone for the local date range, e.g. Europe/Berlin."
    }
  },
  "required": [
    "q"
  ],
  "description": "Arguments for the gmail__search_emails tool."
}