Skip to main content
Glama
iTvX

Google Workspace MCP — Gmail edition

by iTvX

manage_email

Manage Gmail messages and threads: search, read, triage, label, archive, trash, report spam, and handle drafts, labels, and filters. Does not send mail.

Instructions

Search, read, triage, label, archive, trash, report spam, and manage drafts, labels and filters in a Google Workspace account. Supports Gmail search syntax. This tool sends nothing: sending, replying and forwarding are send_email.

Input Schema

NameRequiredDescriptionDefault
ccNoCC email(s), comma-separated
toNoRecipient email(s), comma-separated
bccNoBCC email(s), comma-separated
bodyNoEmail body text
fromNoSender email or RFC 2822 mailbox for a verified Gmail Send As alias
htmlNoTreat body as HTML content (default: plain text)
nameNoLabel name, e.g. 'REC/Receipt'. Nested labels use a slash; create the parent first if Gmail shows nesting.
emailYesAccount email address. On list operations, "all" runs it once for every configured account.
queryNoGmail search query (e.g. "from:alice subject:meeting has:attachment")
formatNoFor getThread: full (default) includes each message's body; metadata is From, To, Subject and Date only
draftIdNoDraft id as returned by listDrafts (an r… id, not the message id)
idsOnlyNoOn `search`: return only message ids, up to 500 per page, without fetching each message's headers. For counting a large result or collecting ids to pass to bulk_operations batch mode (e.g. modify).
labelIdNoLabel ID (from `labels`), e.g. Label_123 — not the label name
matchToNoFilter criterion: recipient, e.g. a list or alias address
subjectNoEmail subject line
filenameNoAttachment filename, exactly as it appears in the `read` response (e.g. 'invoice_template.md')
filterIdNoFilter id, as listed by `filters`. On previewFilter, the filter a change would replace; leave it out to preview a new filter.
replyAllNoFor a reply draft: include everyone on the thread, as reply-all does (default: reply to the sender)
threadIdNoThread ID to retrieve
matchFromNoFilter criterion: sender, e.g. billing@vendor.com or @vendor.com
matchSizeNoFilter criterion: size in bytes; requires matchSizeComparison
messageIdNoEmail message ID
operationYessearch: find emails by query. Says when more results exist than the page shows; continue with pageToken, or pass idsOnly to collect up to 500 ids per page for bulk_operations. | read: get full email by ID. Pass bodyFormat: 'html' when the plain-text part is a stub (marketing email, invitations, booking confirmations) and the dates/codes you need only exist in the HTML — returned HTML is sanitized and wrapped in a Spotlighting block (ADR-305). | archive: archive a message, as Gmail's Archive button does: it leaves the inbox but stays in All Mail with its other labels. `unarchive` puts it back. | unarchive: move an archived message back to the inbox | markRead: mark a message as read | markUnread: mark a message as unread | triage: unread inbox summary (sender, subject, date) | trash: move a message to trash | markSpam: report a message as spam: moves it out of the inbox into Spam | unmarkSpam: not spam: moves a message from Spam back to the inbox | modifyThread: add or remove labels on every message in a thread at once (e.g. a label on the whole conversation; removeLabelIds UNREAD marks it all read) | archiveThread: archive a whole conversation: every message in the thread leaves the inbox | unarchiveThread: move a whole conversation back to the inbox | markThreadSpam: report a whole conversation as spam: every message moves out of the inbox into Spam | unmarkThreadSpam: not spam: moves a whole conversation from Spam back to the inbox | trashThread: move a whole conversation (every message in the thread) to trash | untrashThread: restore a whole conversation from trash | untrash: restore a message from trash | listDrafts: list saved drafts (unsent messages) with each draft's DRAFT id (the r… id), recipient, subject and date. Use that draft id with deleteDraft — a message id from search in:drafts will not work for deletion. | createDraft: save a new draft without sending it. Give to, subject and body for a new message; give replyToMessageId instead for a reply draft in that message's thread (recipients, subject and quoting are filled in, as for a reply). Returns the draft id (r…). | getDraft: read a draft by its draft id (the r… id from listDrafts or createDraft): recipients, subject, body and attachments | updateDraft: change a draft without sending it. Only the fields you give change; recipients, subject, body and attachments you leave out are kept, and a reply draft stays in its thread. `body` replaces the whole text; `attachments` replaces all attachments. | deleteDraft: permanently delete a draft (unsent message) by its draft id (the r… id returned by listDrafts). Irreversible — the draft is discarded, not moved to trash. | getAttachment: download an email attachment to workspace directory (use read first to see attachment list) | viewAttachment: view an image attachment inline without saving to workspace (png, jpg, gif, webp). Use for quick preview — use getAttachment to save. | modify: add or remove labels on a message (e.g. archive, mark read/unread) | previewModifyMatching: evaluate a label change over everything a query matches, without making it: the exact count (up to 10,000), a sample, and what the change does to each message. Holds the matched set and returns the previewToken modifyMatching needs. No ids are returned beyond the sample. | modifyMatching: apply a previewed label change (archive, mark read, label, trash) to exactly the messages previewModifyMatching counted, and report how many changed. Requires its previewToken from an earlier call, within 30 minutes; each preview applies once. | labels: list all labels in the mailbox | createLabel: create a label. A slash in the name makes it nested (e.g. 'REC/Receipt' under 'REC'). Fails if the name already exists. Use `labels` first to check, then pass the returned label ID to `modify`. | updateLabel: rename a label or change where it shows. Only the fields you give change. Renaming 'REC' does not rename nested 'REC/…' labels. | deleteLabel: delete a label. The messages themselves stay where they are; they just lose this label. Irreversible. | filters: list the account's filters: id, criteria and what each does. Gmail allows 1,000. | getFilter: one filter's criteria and actions in words, plus the parameters that recreate or edit it | previewFilter: evaluate a filter without creating it: how many messages it matches today and a sample, what each action does, and any duplicate or overlapping filter. Returns the previewToken createFilter needs; with filterId, previews replacing that filter and returns the token updateFilter needs. Criteria are the match* params; actions are addLabelIds and removeLabelIds (filters cannot forward mail in this build). A good criterion is the query of a search that already found the mail. | createFilter: create a filter. Requires the previewToken from previewFilter called with the same parameters, in an earlier call, within 30 minutes. Acts on mail arriving from then on. | updateFilter: change a filter's criteria or actions. Gmail has no in-place update, so this creates the replacement and then deletes the original; the filter gets a new id. Requires the previewToken from previewFilter called with filterId and the same parameters. | deleteFilter: delete a filter. Returns what it was and the parameters to recreate it. | threads: list email threads by query | getThread: read a whole conversation: every message in the thread with its sender, date and body. Pass format metadata for headers only, to skim a long thread.
pageTokenNoContinue a list from where the previous page stopped: pass the pageToken its response gave. Absent from a response means that response was the last page.
bodyFormatNoHow to render the message body. 'plain' (default) returns text/plain or a crude HTML-strip fallback. 'html' returns the text/html part sanitized — useful when the plain-text part is empty/stub.
matchQueryNoFilter criterion: any Gmail search query the message must match, same syntax as search
maxResultsNoMax results per page (default 10, max 50). On `search` with idsOnly, default and max 500.
addLabelIdsNoComma-separated label IDs to add (e.g. STARRED, IMPORTANT, Label_123). On modify, to this message; on the filter operations, to each matching message as it arrives; on the *ModifyMatching operations, to every message the preview counted.
attachmentsNoWorkspace filenames to attach, comma-separated (files must exist in workspace via manage_workspace)
matchSubjectNoFilter criterion: words in the subject
previewTokenNoThe token the preview returned for this exact change: previewFilter for createFilter and updateFilter, previewModifyMatching for modifyMatching. Required: the write runs only after its preview has been seen.
removeLabelIdsNoComma-separated label IDs to remove (e.g. UNREAD to mark read, INBOX to archive). On modify, from this message; on the filter operations, from each matching message as it arrives; on the *ModifyMatching operations, from every message the preview counted.
replyToMessageIdNoFor createDraft: make it a reply draft to this message id, in its thread
matchExcludeChatsNoFilter criterion: leave chat messages out
matchNegatedQueryNoFilter criterion: a Gmail search query the message must NOT match
matchHasAttachmentNoFilter criterion: only messages with an attachment
labelListVisibilityNoWhether the label appears in the label list: labelShow (default), labelShowIfUnread, or labelHide
matchSizeComparisonNoFilter criterion: whether matches are larger or smaller than matchSize
messageListVisibilityNoWhether the label appears on messages in the message list: show (default) or hide

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.8.0

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It usefully says 'This tool sends nothing' and lists mutation-heavy operations like trash, spam, drafts, labels and filters, but it omits permissions, irreversibility and preview-token gating that the operation-level schema describes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the operation set, then Gmail search syntax support, then the send_email boundary. It is appropriately sized for a 39-parameter multi-operation tool without wasting words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The top-level description is appropriately high-level for a schema that exhaustively documents each operation, and it names the key sibling boundary. It does not globally flag destructive operations or preview-token requirements, but the operation descriptions cover those details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description only adds that Gmail search syntax is supported, but the query parameter already documents that syntax with an example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific set of verbs and resources: search, read, triage, label, archive, trash, report spam, manage drafts, labels and filters. It also names the sibling send_email as the tool for sending, so an agent can distinguish Gmail management from sending without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes sending, replying and forwarding to send_email, which is the main sibling boundary for this tool. It does not give top-level when-to-use guidance for choosing among its many operations, though the operation enum description supplies that detail in the schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.