Search Gmail
The newest messages in a mailbox, or those matching a Gmail search.
Free*
*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.
An example
Which Gmail messages in support@ are still unread?
Your agent callsgoogle_mail_searchFree*
The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.
{
"mailbox": "support@halversoncycle.example",
"unread_only": true
}Use it when
The agent starts its round of the mailbox, or looks for a customer's earlier email.
What it does
The newest messages in a mailbox (the inbox by default), or those matching a Gmail search like "from:rachel subject:tabor": sender, subject, a preview and whether they are read. Free.
What comes back
mailbox; messages: each with id, subject, from, to, received_at, preview, read and thread_id. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
mailbox | string | One of the mailboxes the agent may act as; optional when only one is connected. Up to 254 characters. |
query | string | Up to 300 characters. |
folder | string | One of: inbox,sent,drafts,spam,trash,all. Default: inbox. |
unread_only | boolean | Default: false. |
limit | integer | 1 to 25. Default: 10. |
The call
Over MCP, call google_mail_search on https://api.conecto.chat/mcp/googleworkspace. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/google_mail_search \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"mailbox":"support@halversoncycle.example","unread_only":true}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_connected409 | Google Workspace isn't connected yet. | Connect it with google_connect. |
not_allowed403 | The mailbox is not one the agent may act as. | Use a connected mailbox; the owner adds one by connecting again. |
vendor_rejected502 | Google refused: delegation is missing a scope, or Google said no. | Ask the Workspace admin to grant what the message names. |
More Google Workspace tools
All 11 tools- Connect Google Workspace
google_connectConnects the company's Google Workspace through its own service account, for the mailboxes the agent may act as.Free - Read a Gmail message
google_mail_readOne message in full, with its body as text and its attachments' names.Free* - Send Gmail
google_mail_sendSends an email, or a reply in the same thread, as one of the company's mailboxes.$0.001 a call - Read a Google Calendar
google_calendar_eventsThe events in a mailbox's calendar between two times, in UTC.Free* - Add a Google Calendar event
google_calendar_createAdds an event to a mailbox's calendar and invites its attendees, with a Meet link if asked.$0.001 a call - Cancel a Google Calendar event
google_calendar_cancelCancels an event and tells its attendees; waits for the owner by default.$0.001 a call - Search Google Drive
google_drive_searchFiles in a mailbox user's Drive, shared drives included, whose words match.Free* - Read a Google Drive file
google_drive_readA Drive file's words: Docs, Sheets, Slides, text, PDF or Office, up to 5 MB.Free*
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md