Google Workspace MCP Server

search_emails

Search and filter emails in your Google Workspace account using advanced Gmail queries. Retrieve specific messages by sender, recipient, subject, attachments, date range, or unread status, with customizable result limits.

Instructions

Search emails with advanced query

Input Schema

NameRequiredDescriptionDefault
maxResultsNoMaximum number of emails to return (default: 10)
queryYesGmail search query (e.g., "from:example@gmail.com has:attachment"). Examples: - "from:alice@example.com" (Emails from Alice) - "to:bob@example.com" (Emails sent to Bob) - "subject:Meeting Update" (Emails with "Meeting Update" in the subject) - "has:attachment filename:pdf" (Emails with PDF attachments) - "after:2024/01/01 before:2024/02/01" (Emails between specific dates) - "is:unread" (Unread emails) - "from:@company.com has:attachment" (Emails from a company domain with attachments)

Input Schema (JSON Schema)

{ "properties": { "maxResults": { "description": "Maximum number of emails to return (default: 10)", "type": "number" }, "query": { "description": "Gmail search query (e.g., \"from:example@gmail.com has:attachment\"). Examples:\n- \"from:alice@example.com\" (Emails from Alice)\n- \"to:bob@example.com\" (Emails sent to Bob)\n- \"subject:Meeting Update\" (Emails with \"Meeting Update\" in the subject)\n- \"has:attachment filename:pdf\" (Emails with PDF attachments)\n- \"after:2024/01/01 before:2024/02/01\" (Emails between specific dates)\n- \"is:unread\" (Unread emails)\n- \"from:@company.com has:attachment\" (Emails from a company domain with attachments)", "required": true, "type": "string" } }, "required": [ "query" ], "type": "object" }

You must be authenticated.

Other Tools from Google Workspace MCP Server

Related Tools

ID: 8nrlttca99