Gmail

Connect your AI agents to Gmail.

Available Tools

get_attachment

Download attachment data from a message by attachment ID. Returns binary data (base64url encoded), filename, MIME type, and size.

list_drafts

List all draft messages with pagination. Returns draft references with ID and snippet. Use get_draft for complete details.

get_draft

Retrieve complete details of a specific draft by ID including message content, headers, recipients, and metadata.

create_draft

Create a new draft message with recipients, subject, and body. Supports HTML, CC/BCC, attachments, and threading. Returns draft with ID.

update_draft

Update an existing draft by replacing its content. Completely replaces draft’s message content. Returns updated draft.

delete_draft

Permanently delete a draft. Cannot be undone. Draft and content are permanently removed.

send_draft

Send an existing draft immediately. Draft is sent as email and automatically deleted from drafts. Returns sent message with ID.

list_labels

List all labels including system and custom labels. Returns name, type, visibility, message counts, and colors.

get_label

Retrieve detailed information about a specific label by ID including name, type, visibility, message counts, and colors.

create_label

Create a new custom label for organizing messages. Specify name, visibility settings, and optional colors. Returns created label with ID.

update_label

Update an existing label’s properties including name, visibility, and colors. Cannot modify system labels, only custom labels.

delete_label

Permanently delete a custom label. Removes label from all messages. Cannot delete system labels. Cannot be undone.

list_messages

List messages with search, filtering, and pagination. Supports Gmail query syntax (from:, to:, subject:, is:unread, etc.). Returns message references only.

get_message

Retrieve complete message details by ID including headers, body, attachments, labels, and metadata. Format options control detail level.

send_message

Send a new email with recipients, subject, and body. Supports HTML, CC/BCC, attachments, and threading. Returns sent message with ID and thread ID.

modify_message_labels

Add or remove labels from a message. Supports up to 100 label additions/removals per operation. Use system or custom label IDs.

delete_message

Move message to TRASH (soft delete). Recoverable for 30 days. Message gets TRASH label and is removed from other folders.

batch_delete_messages

Move multiple messages to trash in a single batch operation. More efficient than individual deletes.

batch_modify_messages

Modify labels on multiple messages in a batch operation. Supports up to 100 label additions/removals. More efficient than individual modifications.

list_threads

List conversation threads with search, filtering, and pagination. Supports Gmail query syntax. Returns thread references with ID and snippet.

get_thread

Retrieve a complete conversation thread by ID including all messages in chronological order. Format options control detail level.

modify_thread_labels

Add or remove labels from all messages in a thread simultaneously. Supports up to 100 label additions/removals. More efficient than modifying individual messages.

delete_thread

Move all messages in a thread to TRASH (soft delete). Recoverable for 30 days. More efficient than deleting individual messages.