Skip to main content

Gmail

View as Markdown

Exposes the Gmail v1 API as agent tools: read/search/organize mail, manage labels and drafts, send (including in-thread replies), and—when explicitly enabled—permanently delete.

Configuration

FieldNotes
google.authTypeservice (service account) or user (OAuth).
google.serviceKey / google.adminEmailService account JSON key; adminEmail enables domain-wide delegation (impersonate that user).
google.oAuthButton / google.userTokenUser OAuth: sign in to populate the access token.
gmail.accessreadonlymodifysendfull. Resolved by the shared GMAIL spec in core/google_access.py; scopes are never hand-entered.
gmail.allowHardDeleteOff by default. Gate for permanent delete; only effective with access: full.

Access tiers → scopes

TierScope(s)Capability
readonlygmail.readonlyread/search only
modifygmail.modifyread + label/organize (default)
sendgmail.modify, gmail.send+ send mail
fullhttps://mail.google.com/+ permanent delete (with allowHardDelete)

Tools

  • Read/sync: message_list, message_get, message_search, thread_get, thread_list, label_list, draft_list, draft_get, attachment_get, history_list.
  • Organize (write): message_modify, message_batch_modify, label_apply, label_remove, label_create, label_update, label_delete. Change read state by adding/removing the UNREAD label via message_modify / message_batch_modify.
  • Write: message_send (reply in-thread via threadId), message_trash, message_untrash, draft_create, draft_update, draft_send, draft_delete. Sending requires the send or full tier.
  • Permanent delete (gated): message_delete, messages_batchDelete — require allowHardDelete and the full tier; batch ops take an explicit id list (never a query), capped at 1000 per call.
  • Diagnostics: check_connection probes the Gmail API with a live call; for user OAuth it also verifies that granted scopes cover the configured access tier (service-account auth has no per-user scope grant to check).

Operational targets (messageId, threadId, labelId, query) are always tool-call parameters, never node config. Outputs are cleaned shapes (ids, labelIds, snippet, headers, threadId, historyId), not raw API JSON.