Gmail
PocketPaw provides 9 tools for comprehensive Gmail management: search, read, send, label management, trash, and bulk operations.
Setup
- Set up Google OAuth credentials
- Enable the Gmail API in your Google Cloud project
- Authorize PocketPaw to access your Gmail
Tools
gmail_search
Search your inbox using Gmail search syntax (from:, subject:, is:unread, newer_than:1d, etc.):
User: Find emails from John about the project deadlineAgent: [uses gmail_search] → Found 3 emails: 1. "Re: Project deadline" from john@example.com (Jan 15) 2. "Deadline update" from john@example.com (Jan 12) 3. "Project timeline" from john@example.com (Jan 8)Supports a max_results parameter (default: 5, max: 20).
gmail_read
Read the full content of a specific email by message ID:
User: Read the first emailAgent: [uses gmail_read] → Subject: "Re: Project deadline" From: john@example.com Date: Jan 15, 2024 Content: "Hi, the deadline has been moved to..."gmail_send
Send an email (plain text):
User: Reply to John saying we'll meet the deadlineAgent: [uses gmail_send] → Email sent to john@example.comgmail_list_labels
List all Gmail labels with their IDs and types:
User: Show me my Gmail labelsAgent: [uses gmail_list_labels] → - INBOX (system) - SENT (system) - Work/Projects (user) — Label_42 - Newsletters (user) — Label_15gmail_create_label
Create a new Gmail label. Use / for nested labels:
User: Create a label called "Work/Urgent"Agent: [uses gmail_create_label] → Created label "Work/Urgent" (Label_53)gmail_modify
Add or remove labels on a single email. Common label IDs: INBOX, SPAM, TRASH, UNREAD, STARRED, IMPORTANT.
User: Star that email and mark it as importantAgent: [uses gmail_modify] → Added STARRED, IMPORTANT to messagegmail_trash
Move a message to trash:
User: Trash the spam emailAgent: [uses gmail_trash] → Message moved to trashgmail_batch_modify
Bulk label operations on multiple messages at once:
User: Mark all 5 newsletters as read and archive themAgent: [uses gmail_batch_modify] → Modified 5 messages: removed UNREAD, INBOXConfiguration
| Setting | Env Variable | Description |
|---|---|---|
| Client ID | POCKETCLAW_GOOGLE_CLIENT_ID | Google OAuth client ID |
| Client secret | POCKETCLAW_GOOGLE_CLIENT_SECRET | Google OAuth client secret |
Policy Group
All Gmail tools belong to group:gmail.
# Enable Gmail toolsexport POCKETCLAW_TOOLS_ALLOW="group:gmail"
# Or disableexport POCKETCLAW_TOOLS_DENY="group:gmail"Required Scopes
PocketPaw requests these Gmail scopes:
gmail.readonly— For search, read, and label listinggmail.send— For sending emailsgmail.modify— For label management, trash, and bulk operations