Skip to main content
Search, read, and send emails. By default, exposes query_gmail for searching and reading. Enable write=True to also expose update_gmail for drafting and sending.

Authentication

Gmail requires Google OAuth or a service account with domain-wide delegation.
Set these environment variables:
Opens browser on first use. Token cached to gmail_token.json.

Configuration

Tools Exposed

Example queries

For draft/send queries, enable writes: GmailContextProvider(write=True)

Resources

GmailTools Reference

All methods and OAuth setup

Cookbook Example

Working example