Expand description
The Gmail tool’s read actions (G3), named after Google’s Gmail MCP tools
(SPEC_GOOGLE_CONNECTORS_GMAIL_CALENDAR_DRIVE_2026_10_14.md §5):
search_threads, get_thread, list_labels.
As with Calendar and Drive, each action is a plan (the request, from
the agent’s arguments) and a shape (Google’s answer, trimmed and
capped); neither touches the network or a token. Google’s thread search
answers with ids and a snippet only, so search_threads takes one more
request per thread shown (summary_plan) for who wrote it, the subject
and the date. Mail is written by other people: every text that comes back
is cut to a length and the tool marks it untrusted (D6).
Structs§
- Gmail
Args - The arguments the read actions take. Unknown fields are ignored.
Constants§
- EXTERNAL_
PARTS - Stored text parts one
get_threadfetches, and the longest one it takes (base64 characters). - EXTERNAL_
PART_ CHARS - READ_
ACTIONS - The read actions, in the order the tool lists them.
- SUMMARIZED
- Threads of a search that get a subject and sender (one request each).
Functions§
- external_
text_ parts - The
(message id, attachment id)of every readable text part ofthreadwhose text must be fetched separately, at mostEXTERNAL_PARTS. - fill_
external - Put the fetched text (
parts: attachment id to the part’s base64url data) into the thread’s parts that name it. - granted_
for - Whether
granted(full scope URLs, or bare names) coversaction.gmail.metadatacan’t search or read bodies, so it coverslist_labelsalone. - logged_
ids - The ids a read touched, for the account’s log (D7): never the search words or the mail.
- needs
- The scopes an action can run with: any one is enough. Only
gmail.readonlyis asked for here, but an account connected with a wider Gmail scope still works. - part_
plan - The request for one stored text part.
- plan
- The request to Google for a read action.
- raw_
headers_ arg - Whether
get_threadis asked for the raw header lines (headers: "raw"); any other word is refused. - shape
- Google’s answer to a read action, trimmed for the agent.
- shape_
search search_threads’ answer: Google’s list and, for the firstSUMMARIZEDthreads, whatsummary_planfound (summaries[i]is the answer for threadi, null when it failed).- shape_
thread - A thread’s answer: each message with its text and sender check, and with its raw header lines when
raw(headers: "raw"). - summary_
plan - The request for a found thread’s headers, for the line
search_threadsshows: who wrote it, the subject and date, and what its sender check reads (Google’s verdicts, the Reply-To), in the same call.