AgentPMT
Gmail - All Email Actions

Gmail - All Email Actions

Connector

Available ActionsEach successful request consumes credits as outlined below.

send_message5crreply_message5crforward_message5crlist_messages5crget_message5crtrash_message5cruntrash_message5crmodify_labels5crlist_labels5crcreate_draft5crsend_draft5crget_draft5crdelete_draft5crget_profile5cr

Details

Gmail connection that enables agents to send, read, search, and manage email through Google OAuth integration. The tool provides comprehensive email functionality including composing and sending new messages with attachments, replying to emails while maintaining thread continuity, and forwarding messages to new recipients. Agents can search and filter emails using Gmail's powerful query syntax to find specific messages by sender, subject, date, labels, or attachment status. The tool supports full email lifecycle management including reading message content with parsed headers and body text, moving messages to trash or permanently deleting them, and modifying labels to organize emails or mark them as read. Draft functionality allows agents to create, retrieve, and send draft emails for workflows requiring human review before sending. Additional capabilities include listing all available labels for organization, retrieving user profile information such as email address and message counts, and sending from custom authenticated email addresses.

Use Cases

Automated email notifications and alerts, Customer inquiry response and follow-up, Email search and retrieval for information gathering, Inbox management and organization with labels, Draft creation for human-in-the-loop email workflows, Email forwarding and delegation workflows, Reading and summarizing email content, Marking messages as read or starring important emails, Sending reports and documents as attachments, Monitoring inbox for specific senders or keywords

Credentials

Google OAuth *
Connect your Google account.
oauth token

Manage credentials in your dashboard.

Actions(14)

send_message5cr9 params(2 required)

Send a new email. Supports plain text, HTML, attachments, CC/BCC, and custom from address (requires send-as alias).

Send a new email. Supports plain text, HTML, attachments, CC/BCC, and custom from address (requires send-as alias).

torequiredarray

Recipient email addresses

Array of: string
subjectrequiredstring

Email subject line

body_textstring

Plain text email body. Required unless body_html is provided.

body_htmlstring

HTML email body. Can be used instead of or in addition to body_text.

ccarray

CC recipients

Array of: string
bccarray

BCC recipients

Array of: string
from_emailstring

From address to override the default sender. Only works if a send-as alias is configured in Gmail settings.

thread_idstring

Thread ID to add this message to an existing conversation thread

attachmentsarray

File attachments. Provide public file URLs that will be fetched and attached.

Array of: object
reply_message5cr6 params(1 required)

Reply to an existing email. The reply stays in the same thread and automatically uses the original subject and recipient.

Reply to an existing email. The reply stays in the same thread and automatically uses the original subject and recipient.

message_idrequiredstring

Gmail message ID of the email to reply to

body_textstring

Plain text reply body. Required unless body_html is provided.

body_htmlstring

HTML reply body. Can be used instead of or in addition to body_text.

ccarray

CC recipients

Array of: string
bccarray

BCC recipients

Array of: string
attachmentsarray

File attachments

Array of: object
forward_message5cr6 params(2 required)

Forward an email to new recipients. The original message content is included automatically.

Forward an email to new recipients. The original message content is included automatically.

message_idrequiredstring

Gmail message ID of the email to forward

torequiredarray

Recipient email addresses to forward to

Array of: string
body_textstring

Optional text to add above the forwarded content

ccarray

CC recipients

Array of: string
bccarray

BCC recipients

Array of: string
attachmentsarray

Additional file attachments

Array of: object
list_messages5cr4 params

Search and list emails. Returns message IDs and thread IDs. Use get_message to read full content.

Search and list emails. Returns message IDs and thread IDs. Use get_message to read full content.

qstring

Gmail search query (e.g., 'is:unread', 'from:user@example.com', 'subject:meeting', 'has:attachment', 'newer_than:7d')

max_resultsinteger

Maximum results to return (1-500)

Default: 20
Range: 1 - 500
label_idsarray

Filter by these label IDs

Array of: string
page_tokenstring

Pagination token from a previous list_messages response

get_message5cr2 params(1 required)

Read the full content of an email including headers, body text, HTML, and attachment metadata.

Read the full content of an email including headers, body text, HTML, and attachment metadata.

message_idrequiredstring

Gmail message ID

message_formatstring

Message format: full (headers + body, default), metadata (headers only), minimal (IDs only)

Values:
fullmetadataminimal
Default: full
trash_message5cr1 param(1 required)

Move an email to the trash.

Move an email to the trash.

message_idrequiredstring

Gmail message ID of the email to trash

untrash_message5cr1 param(1 required)

Restore an email from the trash back to its original location.

Restore an email from the trash back to its original location.

message_idrequiredstring

Gmail message ID of the email to restore

modify_labels5cr3 params(1 required)

Add or remove labels from an email. Common uses: mark as read (remove UNREAD), star (add STARRED), archive (remove INBOX).

Add or remove labels from an email. Common uses: mark as read (remove UNREAD), star (add STARRED), archive (remove INBOX).

message_idrequiredstring

Gmail message ID

add_label_idsarray

Label IDs to add. Common: STARRED, IMPORTANT, UNREAD

Array of: string
remove_label_idsarray

Label IDs to remove. Common: UNREAD (mark as read), INBOX (archive)

Array of: string
list_labels5cr0 params

Get all available Gmail labels (both system and user-created).

Get all available Gmail labels (both system and user-created).

No parameters for this action.

create_draft5cr9 params(2 required)

Create a draft email that can be edited or sent later.

Create a draft email that can be edited or sent later.

torequiredarray

Recipient email addresses

Array of: string
subjectrequiredstring

Email subject line

body_textstring

Plain text email body. Required unless body_html is provided.

body_htmlstring

HTML email body. Can be used instead of or in addition to body_text.

ccarray

CC recipients

Array of: string
bccarray

BCC recipients

Array of: string
from_emailstring

From address override (requires send-as alias)

thread_idstring

Thread ID to associate the draft with an existing conversation

attachmentsarray

File attachments

Array of: object
send_draft5cr1 param(1 required)

Send a previously created draft email.

Send a previously created draft email.

draft_idrequiredstring

Gmail draft ID

get_draft5cr2 params(1 required)

Retrieve the content of a draft email.

Retrieve the content of a draft email.

draft_idrequiredstring

Gmail draft ID

message_formatstring

Message format: full (default), metadata, minimal

Values:
fullmetadataminimal
Default: full
delete_draft5cr1 param(1 required)

Permanently delete a draft email.

Permanently delete a draft email.

draft_idrequiredstring

Gmail draft ID to delete

get_profile5cr0 params

Get the authenticated user's Gmail profile including email address, total message count, and total thread count.

Get the authenticated user's Gmail profile including email address, total message count, and total thread count.

No parameters for this action.

Frequently Asked Questions

How do I connect this tool to an external agent?

Install commands

npm install -g @agentpmt/mcp-router
agentpmt-setup

Hosted MCP config

{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}

How does an external agent use this tool?

Agent prompt

Call the AgentPMT-Tool-Search-and-Execution tool with action 'get_schema' and tool_id 69618e485d4cf4d4b6af40f0 ("Gmail - All Email Actions"). Then call the same tool with action 'call_tool', tool_id 69618e485d4cf4d4b6af40f0, and the parameters needed for my request.

Workflows Using This Tool

2 / 6
Workflow
Saves ~50 min
File Management
Document OCR Agent
Zoho Books
Chart Generator
Gmail - All Email Actions
Processes employee expense reports by accepting receipt uploads, extracting receipt data via OCR, categorizing expenses, booking them to Zoho Books with correct expense accounts, generating an expense breakdown chart, and sending the compiled report for manager approval. Streamlines the entire expense reimbursement process.

Looking for help integrating AI into your business? Set up a free consultation.