Files
platform/seed/tools/gmail/TOOL.md
T
2026-02-24 21:47:36 +00:00

2.3 KiB

name, label, description, language, inputs
name label description language inputs
gmail Gmail Read Gmail messages, threads, and labels using the connected Google account. Use this tool to check emails, search for specific messages, read email content, list labels, or get mailbox profile info. Requires the user to have connected their Google account in Settings → Integrations. typescript
action query message_id thread_id max_results output_dir
type description
string Action to perform: list_messages, get_message, list_labels, get_thread, get_profile, sync_inbox
type description optional
string Gmail search query for list_messages (e.g. 'is:unread', 'from:user@example.com', 'subject:invoice after:2024/01/01') true
type description optional
string Message ID for get_message true
type description optional
string Thread ID for get_thread true
type description optional
string Maximum number of results for list actions (default 10, max 50) true
type description optional
string Directory path to save email files (for sync_inbox action) true

Gmail Tool

Read-only access to the user's Gmail account via the Gmail REST API.

Available Actions

  • list_messages: List or search messages. Use query for Gmail search syntax.
  • get_message: Get full message content by message_id.
  • list_labels: List all Gmail labels with message counts.
  • get_thread: Get all messages in a thread by thread_id.
  • get_profile: Get the user's Gmail profile info.
  • sync_inbox: Bulk-download emails to disk. Requires output_dir. Use query to filter (e.g. after:2026/02/01 before:2026/03/01). Handles pagination internally, saves each email as a markdown file, skips already-saved messages. Returns only a summary count — does NOT flood context with email bodies.

Query Syntax

Gmail search operators for the query parameter:

  • is:unread, is:read, is:starred
  • from:email@example.com, to:email@example.com
  • subject:"search term", has:attachment
  • after:YYYY/MM/DD, before:YYYY/MM/DD
  • in:inbox, in:sent, in:trash
  • larger:1M, smaller:100K
  • Combine with AND, OR, - (NOT)

Scope

This tool has read-only access (gmail.readonly scope). It cannot send, modify, or delete messages.