Forward Gmail thread
Automatically forward Gmail thread on mail.google.com. Forward an entire Gmail thread to one recipient, with an optional note placed above the forwarded content. Takes the hex threadId that search_emails returns and forwards the whole conversation inline rather than a single message. Returns forwarded, threadId and to once Gmail has accepted the send. A thread id Gmail cannot open is refused with nothing sent, and so is a conversation that still has a scheduled reply pending (Gmail hides its Forward control then). Forwarding a conversation that sits in the Bin works, but Gmail then keeps the sent copy out of the Sent folder.
Input
to requiredRecipient email address.
threadId requiredHex legacy thread id.
note optionalOptional plain-text note prepended above the forwarded content.
account optionalGoogle account email to act as (authuser=). Without it Gmail picks u/0, nondeterministic in a multi-account browser jar.
Output
to requiredthreadId requiredforwarded requiredFAQ
Search Gmail
Search the signed-in Gmail with the native query syntax (from:, to:, subject:, has:attachment, after:/before:, labels…) and return matching threads: threadId (feed it to get_thread / reply_to_email), sender, senderEmail, subject, snippet, date, unread, starred, hasAttachment. Results are threads rather than individual messages, which is Gmail's own search granularity, and only the first page of results is returned (up to 50).
Send Gmail email
Send an email from the signed-in Gmail account, with a plain-text body and an optional single file attachment. Always starts a new conversation. To answer inside an existing thread, use mail.google.com/reply_to_email.
Get Gmail thread
Read a Gmail thread by its hex threadId (as returned by search_emails): subject plus every rendered message's from, fromEmail, to, date, plain-text body and attachment names. In long threads Gmail collapses older messages, so only rendered (expanded) messages are returned.
