toolspace › registry › Yep Gmail
Yep Gmail
Send, search, label, and inspect Gmail on the user's behalf via the Gmail API. Python module with a structured action catalog; OAuth refresh-token auth; no inbox content stored server-side.
Install
install-manifest install https://toolspace.yepgent.com/examples/gmail.v0.3.json
manifest JSON · source · docs · issues · homepage
Security
| Kill switch | shell Programmatic: |
|---|---|
| Smoke contract | action-call action |
Scopes
-
gmail.messagesread, send https://www.googleapis.com/auth/gmail.modifyRequired to search the user's inbox, fetch message bodies for context, and send outbound mail on the user's behalf.
-
gmail.labelsread, write https://www.googleapis.com/auth/gmail.labelsApplies and removes labels on threads to mark agent-processed messages and to support user-defined organization schemes.
-
net.outboundread googleapis.comTool calls api.googleapis.com for all Gmail operations. No other outbound destinations.
Data boundary
Reads
gmail.messagessensitivity: highgmail.labelssensitivity: low
Persists
—
Tool-local retention: 90 day(s).
Actions
-
whoami read idempotent
Verify auth and return the operating mailbox. ·
gmail.messages- Goal
- Verify Gmail auth and return the resolved mailbox email and totals.
- Inputs
(none)- Outputs
{email, messages_total, threads_total}- Errors
auth_expired, auth_invalid, network_unreachable- Example
whoami
-
search read idempotent
Search the mailbox by Gmail query syntax. Returns thread IDs and snippets. ·
gmail.messages- Goal
- Search the mailbox via Gmail query syntax and return thread IDs with snippets.
- Inputs
query (Gmail q-syntax, ≤512 chars), limit (1..100, default 25)- Outputs
{threads: [{thread_id, snippet, subject?, from?}]}- Errors
invalid_query, rate_limited, auth_expired- Example
search query='is:unread from:alice@x.com' limit=10
-
send destructive
Send an email from the authenticated mailbox. ·
gmail.messagesnet.outbound- Goal
- Send an email message via the authenticated Gmail mailbox.
- Inputs
to (email), cc[]/bcc[] (≤32), subject (≤998), body (text), body_format (plain|html)- Outputs
{message_id, thread_id}- Errors
invalid_recipient, rate_limited, auth_expired, payload_too_large- Example
send to=alice@x.com subject='Hi' body='Just checking in.'
-
label_thread write idempotent
Add one or more labels to an existing thread. ·
gmail.labels- Goal
- Apply labels to a Gmail thread to mark it for downstream workflows.
- Inputs
thread_id (string), labels (1..16 strings)- Outputs
{thread_id, label_ids}- Errors
thread_not_found, label_unknown, auth_expired- Example
label-thread thread_id=187a4f... labels=['Yep/processed']
-
unlabel_thread write idempotent
Remove one or more labels from an existing thread. ·
gmail.labels- Goal
- Remove labels from a Gmail thread.
- Inputs
thread_id (string), labels (1..16 strings)- Outputs
{thread_id, label_ids}- Errors
thread_not_found, label_unknown, auth_expired- Example
unlabel-thread thread_id=187a4f... labels=['Yep/processed']
Environment
GOOGLE_CLIENT_ID |
Your Google OAuth 2.0 Client ID for the project that has the Gmail API enabled. Looks like '123456789012-abc...apps.googleusercontent.com'. Found in Google Cloud Console > APIs & Services > Credentials. required · secret: no · obtain |
|---|---|
GOOGLE_CLIENT_SECRET |
Your Google OAuth 2.0 Client Secret, paired with the Client ID above. Treat as a password. required · secret: yes · obtain |
GOOGLE_REFRESH_TOKEN |
Long-lived OAuth refresh token for the Gmail account this tool will operate on. Run `python -m yep_gmail_tool authorize` once to obtain. The host stores it in your secret backend; never paste this value into argv or shell history. required · secret: yes · obtain |
GOOGLE_USER_EMAIL |
Email address of the Gmail account this tool operates on. Used by the smoke test to verify auth resolves to the expected mailbox; not required for any non-smoke action. optional · secret: no |
GMAIL_DEFAULT_LABEL |
Optional default Gmail label this tool will apply to messages it processes. Leave blank to skip auto-labeling. optional · secret: no (default |
Verify & cost
| Verify suite | ./eval/suite.jsonl · 12 cases · pass ≥ 0.92 |
|---|---|
| SLA | p50 400 ms · p95 1500 ms · max error rate 0.02 |
| Schedule | cadence: daily · on install: yes |
| Install fee | 0¢ |
| Monthly fee | 0¢ |
| Usage model | external |
Runtime
runtime: python-module · install method: pip · entrypoint: python -m yep_gmail_tool
A standalone Python capability that exposes a small set of Gmail operations to autonomous agents through the install-manifest v0.3 actions[] catalog. Authenticates via standard Google OAuth installed-app flow; the user grants once, the refresh token is held in the host's secret backend, and the tool exchanges it for short-lived access tokens at runtime. No message bodies are persisted by the tool itself. v0.3 adds a verify suite, an SLA contract, and an explicit data_boundary declaration showing this tool talks ONLY to the Gmail API — no third-party model or vendor sees mailbox content.
Tags: emailgmailgooglemessaging
License: MIT
Last fetched (working tree) (local)