gogcli-mcp-gmail

v4.12.0
gogcli-mcp-gmail Checked 3 days ago Published 25 days ago

Extended Gmail MCP server via gogcli — auth + full Gmail support (threads, labels, drafts, attachments, forward, autoreply, bulk operations)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gog_auth_list

List the Google accounts stored in gogcli, with their scopes. This reads local configuration only — it does not contact Google and does NOT tell you whether an account still works: a signed-out account whose refresh token expired or was revoked is listed here exactly like a healthy one, scopes and all. Use gog_auth_health to check whether an account can actually authenticate.

gog_auth_status

Show gogcli auth CONFIGURATION: keyring backend, credential files, and auth setup. Despite the name this is not a health check — it reads local setup and does not contact Google, so it says nothing about whether an account can still authenticate. Use gog_auth_health for that.

gog_auth_health

Check the LIVE health of each stored Google account. Unlike gog_auth_status (which only reports keyring/config setup), this performs a real token refresh against Google, so it detects expired or revoked (invalid_grant) refresh tokens — the account-wide sign-out that blocks every service. Reports per account: whether the token is currently valid, the mapped cause when it is not, how long ago it was authorized, and a warning as it approaches the 7-day refresh-token limit that applies to OAuth apps whose consent screen is still in "Testing" mode. Run it proactively to re-authorize on your own s…

gog_auth_services

List all Google services supported by gogcli and the OAuth scopes each requires.

gog_auth_add

Authorize a Google account via browser-based OAuth. Opens a browser window where the user must sign in and grant access. Blocks for up to 5 minutes waiting for the user to complete authorization. If the browser does not open automatically, a fallback URL is included in the response. Use gog_auth_list to check which accounts are already configured.

ParameterTypeDescription
email *stringGoogle account email to authorize
extraScopesstringAdditional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers — e.g. https://www.googleapis.com/auth/bigquery.readonly, require…
servicesstringServices to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "gmail". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on the…

gog_auth_add_url

Begin REMOTE/headless Google authorization (step 1 of 2). Returns a sign-in URL to open in any browser — no local server or terminal on the gogcli host is needed, so this works on a hosted deployment where the interactive gog_auth_add cannot. Hand the URL to the user; after they sign in, the browser is redirected to a localhost URL that fails to load — that is expected. They copy that full redirected URL (from the address bar) and you pass it to gog_auth_add_complete. The link is valid for 10 minutes. If you pass a custom `services` here, pass the SAME value to gog_auth_add_complete or the…

ParameterTypeDescription
email *stringGoogle account email to authorize
extraScopesstringAdditional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers — e.g. https://www.googleapis.com/auth/bigquery.readonly, require…
servicesstringServices to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "gmail". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on the…

gog_auth_add_complete

Complete REMOTE/headless Google authorization (step 2 of 2). Takes the full redirected localhost URL the user copied after finishing gog_auth_add_url, exchanges it for a refresh token, and stores it. Use the SAME `services` value you passed to gog_auth_add_url. Must run within 10 minutes of step 1 and against the same gogcli host.

ParameterTypeDescription
email *stringGoogle account email being authorized (same as step 1)
redirectUrl *stringThe full localhost redirect URL the user copied from the browser address bar after signing in (contains code and state; the page itself fails to load, which is expected).
extraScopesstringExtra OAuth scope URIs — MUST match the value passed to gog_auth_add_url, for the same reason `services` must: the two steps have to describe the same grant.
servicesstringServices authorized — MUST match the value passed to gog_auth_add_url. Default: "gmail".

gog_auth_run

Run any gog auth subcommand not covered by the other tools. Run `gog auth --help` for the full list of subcommands, or `gog auth <subcommand> --help` for flags on a specific subcommand. Only these subcommands are available: list, status, services, alias. Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path posit…

ParameterTypeDescription
args *arrayAdditional positional args and flags
subcommand *stringThe gog auth subcommand to run, e.g. "alias", "list", "status"

gog_gmail_get

Get a Gmail message by ID. By DEFAULT (format "text") the result is the message DECODED: the headers that matter (from, to, cc, bcc, replyTo, subject, date, messageId, inReplyTo, references), threadId, isReply, the plain-text body (an HTML-only message is converted to text; `textSource` says which) and the attachments by name — no base64 to decode. "html" returns the HTML part instead, "both" returns both. "full" is gog's complete JSON (the old default: raw MIME payload, base64 parts), "metadata" is headers only, and "raw" is the RFC822 source as gog returns it. For a long message with forma…

ParameterTypeDescription
messageId *stringMessage ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
formatstringtext (default): decoded plain-text body + key headers. html: decoded HTML part + key headers. both: text and html. full: gog's complete JSON (raw MIME payload, base64 parts). metadata: headers only. r…
sanitizeContentbooleanReturn gog's agent-oriented sanitized content instead: HTML stripped, HTTP(S) URLs removed, raw Gmail payloads omitted from the JSON. With text/html/both (or no format) this returns gog's sanitized fu…

gog_gmail_send

SENDS MAIL — asks the MCP host to show a confirmation prompt with the recipients, subject, a preview of the body and the attachment names. Mail is sent only after the user accepts that prompt. Three ways to attach a file: `attach` takes paths READ ON THE GOG SERVER; `blobKeys` takes files you uploaded with gog_upload_slots (the way to send a photo or any sizeable file to a hosted server); `attachInline` takes the bytes themselves as base64 (small files). On the hosted connector and any remote deployment there is no shared filesystem, so no path you can name resolves there and `attach` is ref…

ParameterTypeDescription
body *stringEmail body (plain text). Any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog strips trailing newlines from a file-delivered body.
subject *stringSubject line
to *stringRecipient(s), comma-separated
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attacharrayFile paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem — NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-h…
attachInlinearrayAttachments supplied as BYTES rather than as server-side paths — use this whenever you hold a file and the gog server does not, which is always the case on a hosted deployment (e.g. mcp-host). Each…
bccstringBCC recipients, comma-separated
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
ccstringCC recipients, comma-separated
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
quotebooleanInclude the original message quoted below the body. Requires replyToMessageId or threadId. gog quotes by DEFAULT on gmail reply but never on gmail send, so without this a threaded send arrives with th…
replyToMessageIdstringMessage ID to thread this message against — sets In-Reply-To/References only. It does NOT quote the original (pass quote for that), inherit its recipients, or prefix the subject with "Re:". For an a…
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
threadIdstringThread ID to thread this message within. Same caveat as replyToMessageId: threading only, no quote and no inherited subject or recipients.

gog_gmail_reply

SENDS MAIL — asks the MCP host to show a confirmation prompt with the resolved recipient, subject, a preview of the body and the attachment names. Mail is sent only after the user accepts that prompt. To STAGE a reply instead of sending it, use gog_gmail_drafts_reply (gogcli-mcp-gmail only), which never needs confirmation. Reply to a Gmail message (goes to the original sender only). USE THIS, not gog_gmail_send, whenever you are answering a message: it threads off the original AND inherits its "Re:" subject and quotes its body below yours, which gog_gmail_send does not — a send with replyT…

ParameterTypeDescription
messageId *stringGmail message ID to reply to — the short hex `id` from gog_gmail_get / _search (or gog_gmail_messages_search, gogcli-mcp-gmail only). NOT the threadId, NOT the RFC822 `<…@host>` Message-Id header.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attacharrayFile paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem — NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-h…
attachInlinearrayAttachments supplied as BYTES rather than as server-side paths — use this whenever you hold a file and the gog server does not, which is always the case on a hosted deployment (e.g. mcp-host). Each…
autoFromAddressedAliasbooleanWhen from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address — so a reply to mail sent to an alias goes back out from th…
bccarrayAdd or move recipients to Bcc (repeatable)
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
bodystringReply body (plain text; required unless bodyHtml or bodyHtmlFile is set). Any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog stri…
bodyHtmlstringReply body (HTML; optional). Pass the HTML itself at any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Mutually exclusive with bodyHtmlFi…
bodyHtmlFilestringPath to an HTML file that ALREADY EXISTS on the gog server for the reply body. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out.…
ccarrayAdd or move recipients to Cc (repeatable)
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
fromstringSend from this email address (must be a verified send-as alias)
noQuotebooleanDo not include the original message quoted below the reply (default: the original is quoted)
removearrayRemove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all.
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
subjectstringOverride reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread.
toarrayAdd or move recipients to To (repeatable). Added on top of the recipients inherited from the original message.

gog_gmail_reply_all

SENDS MAIL — asks the MCP host to show a confirmation prompt with the resolved recipients, subject, a preview of the body and the attachment names. Mail is sent only after the user accepts that prompt. To STAGE a reply-all instead of sending it, use gog_gmail_drafts_reply_all (gogcli-mcp-gmail only), which never needs confirmation. Reply to all participants of a Gmail message (the sender plus every To/Cc recipient). Same inherited "Re:" subject and quoted original as gog_gmail_reply. Use the remove flag to drop specific recipients from the reply-all. If the client cannot show that prompt (no…

ParameterTypeDescription
messageId *stringGmail message ID to reply to — the short hex `id` from gog_gmail_get / _search (or gog_gmail_messages_search, gogcli-mcp-gmail only). NOT the threadId, NOT the RFC822 `<…@host>` Message-Id header.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attacharrayFile paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem — NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-h…
attachInlinearrayAttachments supplied as BYTES rather than as server-side paths — use this whenever you hold a file and the gog server does not, which is always the case on a hosted deployment (e.g. mcp-host). Each…
autoFromAddressedAliasbooleanWhen from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address — so a reply to mail sent to an alias goes back out from th…
bccarrayAdd or move recipients to Bcc (repeatable)
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
bodystringReply body (plain text; required unless bodyHtml or bodyHtmlFile is set). Any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog stri…
bodyHtmlstringReply body (HTML; optional). Pass the HTML itself at any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Mutually exclusive with bodyHtmlFi…
bodyHtmlFilestringPath to an HTML file that ALREADY EXISTS on the gog server for the reply body. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out.…
ccarrayAdd or move recipients to Cc (repeatable)
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
fromstringSend from this email address (must be a verified send-as alias)
noQuotebooleanDo not include the original message quoted below the reply (default: the original is quoted)
removearrayRemove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all.
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
subjectstringOverride reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread.
toarrayAdd or move recipients to To (repeatable). Added on top of the recipients inherited from the original message.

gog_gmail_run

Run any gog gmail subcommand not covered by the other tools. Run `gog gmail --help` for the full list of subcommands, or `gog gmail <subcommand> --help` for flags on a specific subcommand. Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path positionally (e.g. drive upload) are refused in favour of their dedicat…

ParameterTypeDescription
args *arrayAdditional positional args and flags
subcommand *stringThe gog gmail subcommand to run, e.g. "archive", "mark-read", "labels"
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_raw

Dump the raw Gmail API response as JSON (lossless; for scripting and LLM consumption).

ParameterTypeDescription
messageId *stringGmail message ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
formatstringGmail format (default: full)
prettybooleanPretty-print JSON (default: compact single-line)

gog_gmail_attachment

Download a Gmail attachment and deliver its contents so you can actually read them. Identify the attachment by attachmentIndex (preferred: the 0-based position from a listing fetched with useIndexedAttachmentIds — stable, and it resolves the real name before the download) or by the legacy opaque attachmentId. The real filename and MIME type are resolved from the message part metadata, so the saved file and response are named correctly (e.g. Guest_Copy.pdf), never a generic *.bin. deliver="auto" (default): images always come back as a native image block; anything else is written server-side a…

ParameterTypeDescription
messageId *stringGmail message ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attachmentIdstringThe opaque attachment ID from a listing. Legacy addressing: Gmail re-issues a DIFFERENT id for the same part on every API call, so an id copied from an older listing can be stale. Prefer attachmentInd…
attachmentIndexintegerThe attachment's 0-based position in its message — the `attachmentIndex` field of a listing fetched with useIndexedAttachmentIds. Stable (a message's MIME structure does not change), so this is the…
deliverstringHow to return the contents: auto (image inline; else a server-side file path), inline (force bytes as image/resource blob), drive (always a Drive link), url (a signed download link you can fetch with…
driveFolderstringDestination Google Drive folder ID for the uploaded copy (deliver="drive").
inlineMaxBytesintegerByte ceiling under which gog embeds the attachment bytes rather than only writing the file. Defaults to gog's own 3145728, which this server pins explicitly on every call so an ambient GOG_GMAIL_INLIN…
namestringFilename override. Defaults to the attachment's real filename from the message metadata; pass this to skip that lookup or force a name.
outstringServer-side path where gog writes the file; must be inside the server's GOG_FILE_ROOTS directories. NOTE: this resolves on the gog server's filesystem, not your machine — on a hosted deployment you…

gog_gmail_url

Print Gmail web URLs for one or more threads.

ParameterTypeDescription
threadIds *arrayOne or more thread IDs
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_history

List Gmail history events since a given historyId (for syncing).

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
allbooleanFetch all pages
maxnumberMax results (default: 100)
pagestringDeprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response.
pageTokenstringCursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO…
sincestringStart history ID

gog_gmail_archive

Archive messages (remove from inbox). Pass either messageIds or a Gmail search query. Set thread=true to treat the ids as THREAD ids and archive every message in each thread (the right mode for ids that came from thread search).

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
maxnumberMax messages when using --query (default: 100)
messageIdsarraySpecific message IDs to act on
querystringGmail search query (alternative to messageIds; acts on all matching)
threadbooleanTreat messageIds as THREAD ids and act on every message in each thread

gog_gmail_mark_read

Mark messages as read. Pass either messageIds or a Gmail search query.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
maxnumberMax messages when using --query (default: 100)
messageIdsarraySpecific message IDs to act on
querystringGmail search query (alternative to messageIds; acts on all matching)

gog_gmail_mark_unread

Mark messages as unread. Pass either messageIds or a Gmail search query.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
maxnumberMax messages when using --query (default: 100)
messageIdsarraySpecific message IDs to act on
querystringGmail search query (alternative to messageIds; acts on all matching)

gog_gmail_trash

Move messages to trash. Pass either messageIds or a Gmail search query.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
maxnumberMax messages when using --query (default: 100)
messageIdsarraySpecific message IDs to act on
querystringGmail search query (alternative to messageIds; acts on all matching)

gog_gmail_message_modify

Modify labels on a single message (add and/or remove labels).

ParameterTypeDescription
messageId *stringGmail message ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
addstringLabels to add (comma-separated, name or ID)
removestringLabels to remove (comma-separated, name or ID)

gog_gmail_batch_delete

Permanently delete multiple messages (requires the broader Gmail scope; not reversible — messages bypass Trash). Requires force:true to delete non-interactively. Use gog_gmail_trash for normal deletes. Because `force` is only the model's say-so, a forced delete also reads each message and asks the MCP host to show the user a confirmation prompt listing them (sender, subject, date; the first 25 by name) first; nothing is deleted unless they accept. If the client cannot show that prompt (no MCP elicitation, e.g. claude.ai), a two-step flow applies instead: call WITHOUT confirmToken and nothing…

ParameterTypeDescription
messageIds *arrayMessage IDs to permanently delete
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
forcebooleanRequired to delete in this non-interactive context — without it the delete is refused as a safety guard.

gog_gmail_batch_modify

Modify labels on multiple messages in one call (add and/or remove labels).

ParameterTypeDescription
messageIds *arrayMessage IDs to modify
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
addstringLabels to add (comma-separated, name or ID)
removestringLabels to remove (comma-separated, name or ID)

gog_gmail_thread_get

Get a Gmail thread with all messages. THIS IS THE CORRECT TOOL WHEN YOU ALREADY KNOW THE threadId — it returns the thread in full, so unlike a search it can never be truncated, mis-ranked, or come back empty because the query missed. Never re-discover a known thread with gog_gmail_search; read it here. For long threads that overflow context, use latestN to fetch only the most recent messages and/or snippetsOnly for a lightweight per-message headers+snippet view; sanitizeContent strips raw payloads/HTML and is the biggest size reducer when you do need bodies. Note each message carries two dis…

ParameterTypeDescription
threadId *stringGmail thread ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
fullbooleanShow full message bodies
latestNintegerReturn only the most recent N messages in the thread (wrapper-side trim; avoids overflowing context on long threads)
sanitizeContentbooleanStrip HTML, remove URLs, omit raw payloads from JSON (largest payload-size reduction)
snippetsOnlybooleanReduce each message to its id, labels, snippet, and key headers (From/To/Cc/Subject/Date), dropping full bodies
useIndexedAttachmentIdsbooleanReport each attachment as a 0-based `attachmentIndex` within its message instead of an opaque `attachmentId`. The index is stable across calls (a message's MIME structure does not change) while the id…

gog_gmail_thread_modify

Modify labels on all messages in a thread (add and/or remove labels).

ParameterTypeDescription
threadId *stringGmail thread ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
addstringLabels to add (comma-separated, name or ID)
removestringLabels to remove (comma-separated, name or ID)

gog_gmail_thread_attachments

List all attachments in a Gmail thread (filenames, ids, sizes). Read-only: to receive the bytes, fetch each one with gog_gmail_attachment (image inline, or deliver="url"/"drive"/"off").

ParameterTypeDescription
threadId *stringGmail thread ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
useIndexedAttachmentIdsbooleanReport each attachment as a 0-based `attachmentIndex` instead of an opaque `attachmentId`. Set this before calling gog_gmail_attachment: the index is stable across calls, the id is not. The index coun…

gog_gmail_labels_list

List all Gmail labels for the account.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_labels_get

Get label details, including message and thread counts.

ParameterTypeDescription
labelIdOrName *stringLabel ID or name (e.g. INBOX, STARRED, or a user-created label)
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_labels_create

Create a new Gmail label.

ParameterTypeDescription
name *stringLabel name
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_labels_rename

Rename a Gmail label.

ParameterTypeDescription
labelIdOrName *stringCurrent label ID or name
newName *stringNew label name
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_labels_delete

Delete a Gmail label.

ParameterTypeDescription
labelIdOrName *stringLabel ID or name to delete
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_labels_modify

Modify labels on one or more threads (add and/or remove labels).

ParameterTypeDescription
threadIds *arrayOne or more thread IDs
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
addstringLabels to add (comma-separated, name or ID)
removestringLabels to remove (comma-separated, name or ID)

gog_gmail_drafts_list

List Gmail drafts. Each entry is annotated FOR FREE — no extra gog invocation, whatever the number of drafts — with `origin` (`api` = created through the Gmail API; `non-api` = the id begins `s:`, i.e. it arrived over IMAP/sync) and `rootsOwnThread` (threadId equals the draft's own messageId, so sending it starts a NEW conversation instead of replying). Read those two as facts about the draft, NOT as a fork verdict: `non-api` is not "Apple Mail" (Thunderbird, Outlook-over-IMAP and Gmail offline all produce `s:` ids), and rootsOwnThread was a 4/8 = 0.50 coin flip for Apple authorship on a l…

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
allbooleanFetch all pages
enrichbooleanAdd subject, from, internalDateIso, to/cc/bcc, recipientCount, hasRecipients and isReply (In-Reply-To present) to each draft. Costs ONE extra gog invocation (`gmail messages search in:drafts`) regardl…
maxnumberMax results (default: 20)
pagestringDeprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response.
pageTokenstringCursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO…

gog_gmail_drafts_diff

Compare TWO NAMED DRAFTS and report exactly how they diverged: which body lines exist only in one, whether either is a superset of the other, how their threading differs, and — kept deliberately separate from all of that — whether there is enough evidence to say one REPLACED the other. Use it when a draft you created stopped resolving (`gog_gmail_drafts_update` returning `Google API error (404 notFound)` is the usual first symptom) and a newer draft has appeared: editing a draft in a real mail client does not update it in place, it writes a new draft and abandons the original, so both copi…

ParameterTypeDescription
draftIdA *stringFirst draft id — conventionally the ORIGINAL (the one you created). Direction is decided by internalDate, not by this order, and the answer says which it treated as the original.
draftIdB *stringSecond draft id — conventionally the SUSPECTED REPLACEMENT.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
maxDiffLinesintegerCap on the per-side line lists (default 200); must be a positive integer. The counts and the verdict are computed on the FULL bodies; only the printed lists are capped, `truncated` says when they were…

gog_gmail_drafts_get

Get a Gmail draft by ID, DECODED by default (format "text"): draftId, messageId, threadId, the headers that matter (from, to, cc, bcc, replyTo, subject, date, messageId, inReplyTo, references), isReply, the plain-text body (an HTML-only draft is converted to text; `textSource` says which) and the attachments by name. "html" returns the HTML part instead, "both" returns both, and "raw" returns gog's complete JSON (raw MIME payload with base64 parts and attachment ids) as before. Read-only: it lists attachments but never downloads them — fetch each one with gog_gmail_attachment.

ParameterTypeDescription
draftId *stringDraft ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
formatstringtext (default): decoded plain-text body + key headers. html: decoded HTML part. both: text and html. raw: gog's full JSON with base64 MIME parts (the previous behaviour).
useIndexedAttachmentIdsbooleanformat raw only: report each attachment as a 0-based `attachmentIndex` instead of an opaque `attachmentId` (stable across calls, unlike the id).

gog_gmail_drafts_create

SAVES ONLY. DOES NOT SEND. Create a new Gmail draft. Recipients (to/cc/bcc) are optional; omit them (or set omitRecipients) to create a recipient-less draft as an accidental-send guard. For replies, prefer replyToThreadId (anchors to the thread's latest message) or replyToMessageId (a specific message) — don't pass a thread id into replyToMessageId, which mis-threads silently.

ParameterTypeDescription
body *stringBody (plain text). Any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog strips trailing newlines from a file-delivered body.
subject *stringSubject
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attacharrayFile paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem — NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-h…
attachInlinearrayAttachments supplied as BYTES rather than as server-side paths — use this whenever you hold a file and the gog server does not, which is always the case on a hosted deployment (e.g. mcp-host). Each…
autoFromAddressedAliasbooleanWhen from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address — so a reply to mail sent to an alias goes back out from th…
bccstringBCC recipients (comma-separated). On gog_gmail_drafts_update: omit to keep the draft's current Bcc, pass "" to clear it.
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
bodyFormatstringHow `body` is written. text (default): the plain part is sent exactly as given. markdown: the plain part drops the **bold**/*italic* markers, and when no bodyHtml is passed the HTML part is rendered f…
bodyHtmlstringBody (HTML; optional). Pass the HTML itself at any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Mutually exclusive with bodyHtmlFile.
bodyHtmlFilestringPath to an HTML file that ALREADY EXISTS on the gog server to use as the HTML body. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times…
ccstringCC recipients (comma-separated). On gog_gmail_drafts_update: omit to keep the draft's current Cc, pass "" to clear it.
fromstringSend from this email address (must be a verified send-as alias)
omitRecipientsbooleanCreate the draft with no recipients even if to/cc/bcc are supplied — an accidental-send guard. Populate recipients in a later update before sending.
quotebooleanInclude the original message quoted below the body. Requires replyToMessageId or replyToThreadId. DEFAULTS OFF: a draft created with a reply target but without this threads correctly and still reads a…
replyAllbooleanAuto-populate recipients from the original message (reply-all), inferring To/Cc from it. Requires replyToMessageId or replyToThreadId. Explicit to/cc/bcc still apply on top; omitRecipients still suppr…
replyTostringReply-To header address
replyToMessageIdstringReply to a specific Gmail MESSAGE id — the short hex `id` field from gog_gmail_get / _search / _thread_get (e.g. 19e7593d77fd9636), NOT a thread id and NOT the RFC822 `<…@host>` Message-Id header.…
replyToThreadIdstringReply to a Gmail THREAD id — passed to gog as --thread-id, which threads the draft using the thread's latest-message headers (In-Reply-To/References). This is what "reply to this thread" almost alwa…
returnFullbooleanAfter writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read.
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
tostringRecipients (comma-separated). On gog_gmail_drafts_update: omit to keep the draft's current To, pass "" to clear it.

gog_gmail_drafts_update

Update an existing Gmail draft. For replies, prefer replyToThreadId (threads off the thread's latest message) or replyToMessageId (a specific message) over passing a thread id into replyToMessageId. An update preserves the draft's existing reply context (In-Reply-To/References) and its threadId; it never invents reply headers for a draft that is not a reply. Attachment semantics: supplying attach REPLACES the draft's existing attachments; omitting it preserves them; set clearAttachments to remove all. REPAIRING THREADING IN PLACE: passing replyToThreadId re-anchors the draft onto that thread a…

gog_gmail_drafts_delete

Permanently delete a Gmail draft (not reversible — drafts do not go to Trash). Requires force:true to delete non-interactively.

ParameterTypeDescription
draftId *stringDraft ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
forcebooleanRequired to delete in this non-interactive context — without it the delete is refused as a safety guard.

gog_gmail_drafts_send

SENDS MAIL — reads the stored draft and asks the MCP host to show a confirmation prompt with its recipients, subject, a preview of the body and the attachment names; the draft is sent only after the user accepts. Send an existing Gmail draft. If the id no longer resolves, the 404 comes back as a DRAFT_FORKED report — what happened, the drafts that do exist (with their free origin/rootsOwnThread fields) and what to do next — rather than a bare notFound. It names no replacement: that judgement needs a named pair and gog_gmail_drafts_diff. If the draft turns out to be still listed, the answ…

ParameterTypeDescription
draftId *stringDraft ID to send
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…

gog_gmail_drafts_copy_to

SENDS MAIL — sends a COPY of a stored draft (its current subject and body, text and HTML parts) to the addresses you name, for review: the classic "DRAFT: <subject>" copy to someone who should read it before it goes out. The draft itself is NOT touched, and nothing of its addressing comes along: not its recipients, not its threading, not its attachments. You never pass the body — the tool reads it from the draft — so a review copy costs no more than its arguments. The confirmation prompt shows the recipients, the subject, the first 300 characters of the body, its length and its SHA-256 â…

ParameterTypeDescription
draftId *stringThe draft to copy. It is read, never modified.
to *stringWho receives the copy (comma-separated).
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
appendTextstringA note added below the draft's body in the copy (plain text; rendered into the HTML part too).
bccstringBCC for the copy (comma-separated).
ccstringCC for the copy (comma-separated).
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
includeQuotedFromstringA Gmail message id whose text is appended below a separator — typically the message the draft replies to, so the reviewer sees what is being answered. Costs one extra read.
subjectPrefixstringPrefix for the copy's subject (default "DRAFT: "; "" for none).

gog_gmail_import

Import an existing RFC822/EML message INTO the mailbox. This is Gmail's import path, not a send: nothing leaves the account, and the message keeps its own From/Date/Message-Id headers so it files where it belongs chronologically. Use it to restore an exported message or to file a .eml under a label; to actually send mail use gog_gmail_send, and to stage one use gog_gmail_drafts_create. The file is read on the gog SERVER, not your machine — on a hosted deployment upload it with gog_upload_slots and pass blobKeys instead.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
filestringPath to an RFC822/EML file that ALREADY EXISTS on the gog server (exactly one of file or blobKeys). gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until…
internalDateSourcestringWhich clock sets Gmail's internal date: dateHeader (gog default — the message's own Date header, so it sorts into the mailbox at its original time) or receivedTime (now).
labelsarrayLabels to apply to the imported message (repeatable). Each may be a label ID or a label name — names are resolved server-side. A name containing a COMMA cannot be passed here: gog declares --label a…
neverMarkSpambooleanNever classify the imported message as spam.
processForCalendarbooleanProcess calendar invitations inside the imported message — this can ADD EVENTS to your calendar.

gog_gmail_forward

SENDS MAIL — asks the MCP host to show a confirmation prompt with the recipients, the note text, and attachment handling. Mail is sent only after the user accepts that prompt. To STAGE a forward instead of sending it, use gog_gmail_drafts_forward, which never needs confirmation. Forward an existing Gmail message to new recipients. If the client cannot show that prompt (no MCP elicitation, e.g. claude.ai), a two-step flow applies instead: call WITHOUT confirmToken and nothing is sent or changed — the result has status "confirmation-required", the full preview and a confirmToken. Follow its…

ParameterTypeDescription
messageId *stringGmail message ID to forward
to *stringRecipients (comma-separated; required)
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
bccstringBCC recipients (comma-separated)
ccstringCC recipients (comma-separated)
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
fromstringSend from this email address (must be a verified send-as alias)
notestringIntroductory text above the forwarded message
noteHtmlstringIntroductory HTML above the forwarded message (gog >= 0.46). Combine with note to give the plain-text part its own wording; any size — a large note is written to a temp file on the gog server rather…
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
skipAttachmentsbooleanDo not include original attachments

gog_gmail_drafts_reply

SAVES ONLY. DOES NOT SEND. Save a reply to a Gmail message as a draft (to the original sender only). Composes exactly what gog_gmail_reply would send — inherited recipients, "Re:" subject and quoted original — but SAVES IT AS A DRAFT instead of sending. Nothing leaves the mailbox; send it later with gog_gmail_drafts_send, or edit it first with gog_gmail_drafts_update (which overwrites the whole body, quote included — read the draft back before editing). Prefer this over gog_gmail_drafts_create + replyToMessageId when the draft is a real reply: that route threads the draft but leaves reci…

ParameterTypeDescription
messageId *stringGmail message ID to reply to — the short hex `id` from gog_gmail_get / _search (or gog_gmail_messages_search, gogcli-mcp-gmail only). NOT the threadId, NOT the RFC822 `<…@host>` Message-Id header.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attacharrayFile paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem — NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-h…
attachInlinearrayAttachments supplied as BYTES rather than as server-side paths — use this whenever you hold a file and the gog server does not, which is always the case on a hosted deployment (e.g. mcp-host). Each…
autoFromAddressedAliasbooleanWhen from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address — so a reply to mail sent to an alias goes back out from th…
bccarrayAdd or move recipients to Bcc (repeatable)
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
bodystringReply body (plain text; required unless bodyHtml or bodyHtmlFile is set). Any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog stri…
bodyHtmlstringReply body (HTML; optional). Pass the HTML itself at any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Mutually exclusive with bodyHtmlFi…
bodyHtmlFilestringPath to an HTML file that ALREADY EXISTS on the gog server for the reply body. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out.…
ccarrayAdd or move recipients to Cc (repeatable)
fromstringSend from this email address (must be a verified send-as alias)
noQuotebooleanDo not include the original message quoted below the reply (default: the original is quoted)
removearrayRemove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all.
returnFullbooleanAfter writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read.
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
subjectstringOverride reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread.
toarrayAdd or move recipients to To (repeatable). Added on top of the recipients inherited from the original message.

gog_gmail_drafts_reply_all

SAVES ONLY. DOES NOT SEND. Save a reply-all to a Gmail message as a draft (sender plus every To/Cc recipient). Composes exactly what gog_gmail_reply_all would send — inherited recipients, "Re:" subject and quoted original — but SAVES IT AS A DRAFT instead of sending. Nothing leaves the mailbox; send it later with gog_gmail_drafts_send, or edit it first with gog_gmail_drafts_update (which overwrites the whole body, quote included — read the draft back before editing). Use the remove flag to drop recipients BEFORE the draft exists, rather than editing them out afterwards.

ParameterTypeDescription
messageId *stringGmail message ID to reply to — the short hex `id` from gog_gmail_get / _search (or gog_gmail_messages_search, gogcli-mcp-gmail only). NOT the threadId, NOT the RFC822 `<…@host>` Message-Id header.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
attacharrayFile paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem — NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-h…
attachInlinearrayAttachments supplied as BYTES rather than as server-side paths — use this whenever you hold a file and the gog server does not, which is always the case on a hosted deployment (e.g. mcp-host). Each…
autoFromAddressedAliasbooleanWhen from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address — so a reply to mail sent to an alias goes back out from th…
bccarrayAdd or move recipients to Bcc (repeatable)
blobKeysarrayHosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the…
bodystringReply body (plain text; required unless bodyHtml or bodyHtmlFile is set). Any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog stri…
bodyHtmlstringReply body (HTML; optional). Pass the HTML itself at any size — a large body is written to a temp file on the gog server rather than inlined into the command line. Mutually exclusive with bodyHtmlFi…
bodyHtmlFilestringPath to an HTML file that ALREADY EXISTS on the gog server for the reply body. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out.…
ccarrayAdd or move recipients to Cc (repeatable)
fromstringSend from this email address (must be a verified send-as alias)
noQuotebooleanDo not include the original message quoted below the reply (default: the original is quoted)
removearrayRemove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all.
returnFullbooleanAfter writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read.
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
subjectstringOverride reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread.
toarrayAdd or move recipients to To (repeatable). Added on top of the recipients inherited from the original message.

gog_gmail_drafts_forward

SAVES ONLY. DOES NOT SEND. Save a forward of a Gmail message as a draft. Same composition as gog_gmail_forward — the original message quoted below an optional note, with its attachments carried over — but nothing is sent. Unlike gog_gmail_forward, `to` is OPTIONAL here: omit it to stage a recipient-less forward as an accidental-send guard, then add recipients with gog_gmail_drafts_update before gog_gmail_drafts_send.

ParameterTypeDescription
messageId *stringGmail message ID to forward
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
bccstringBCC recipients (comma-separated)
ccstringCC recipients (comma-separated)
fromstringSend from this email address (must be a verified send-as alias)
notestringIntroductory text above the forwarded message
noteHtmlstringIntroductory HTML above the forwarded message (gog >= 0.46). Combine with note to give the plain-text part its own wording; any size — a large note is written to a temp file on the gog server rather…
returnFullbooleanAfter writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read.
signaturebooleanAppend the Gmail signature from the active send-as address
signatureFilestringAppend a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.
signatureFromstringAppend the Gmail signature from this send-as email address
skipAttachmentsbooleanDo not include original attachments
tostringRecipients (comma-separated). Optional for a draft — omit to stage the forward without recipients.

gog_gmail_autoreply

SENDS MAIL to every message matching the query — asks the MCP host to show a confirmation prompt containing a bounded search against the same query, including how many messages match and who sent them. Mail is sent only after the user accepts that prompt. There is no draft-only counterpart for this one: it acts across a query-defined set of messages rather than a single reply target, so gog has no "stage all of these as drafts" command to stand in for it — the confirmation prompt is this tool's only pre-send check. Reply once to all messages matching a Gmail search query. Use the label fla…

ParameterTypeDescription
query *stringGmail search query
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
allowSelfbooleanAllow replying to messages sent by your own address
archivebooleanArchive threads after auto-replying
bodystringReply body (plain text; required unless bodyHtml is set)
bodyHtmlstringReply body HTML
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
fromstringSend from this email address (must be a verified send-as alias)
labelstringLabel to add after replying (used for dedupe; default: AutoReplied)
markReadbooleanMark threads as read after auto-replying
maxnumberMax matching messages to inspect (default: 20)
replyTostringReply-To header address
skipBulkbooleanSkip auto-generated/list mail
subjectstringOverride reply subject (default: Re: original subject)

gog_gmail_labels_style

Change a user label's color or visibility (background/text color from Gmail's palette, label-list and message-list visibility).

ParameterTypeDescription
labelIdOrName *stringLabel ID or name to restyle
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
backgroundColorstringBackground color from Gmail's label palette as #RRGGBB
labelListVisibilitystringLabel-list visibility
messageListVisibilitystringMessage-list visibility
textColorstringText color from Gmail's label palette as #RRGGBB

gog_gmail_vacation_get

Get the current vacation responder (auto-reply) settings.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_vacation_update

Update the vacation responder. Pass enable (with subject/body) to turn it on, or disable to turn it off; optional start/end RFC3339 times and contactsOnly/domainOnly scoping. An enabled responder auto-replies to every sender in scope, so enable asks the MCP host to show the user a confirmation prompt with the subject, the text, the window and who gets it first; disabling does not ask. If the client cannot show that prompt (no MCP elicitation, e.g. claude.ai), a two-step flow applies instead: call WITHOUT confirmToken and nothing is sent or changed — the result has status "confirmation-requir…

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
bodystringHTML body of the auto-reply message
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
contactsOnlybooleanOnly respond to contacts
disablebooleanDisable the vacation responder
domainOnlybooleanOnly respond to senders in the same domain
enablebooleanEnable the vacation responder (asks the user first)
endstringEnd time in RFC3339 format (e.g. 2024-12-31T23:59:59Z)
startstringStart time in RFC3339 format (e.g. 2024-12-20T00:00:00Z)
subjectstringSubject line for the auto-reply

gog_gmail_filters_list

List all Gmail filters for the account.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_filters_get

Get the criteria and actions of a single Gmail filter by ID.

ParameterTypeDescription
filterId *stringFilter ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_filters_create

Create a Gmail filter. Specify match criteria (from/to/subject/query/hasAttachment) and one or more actions (label, archive, mark-read, star, important, trash, forward, never-spam). A filter with forward asks the MCP host to show a confirmation prompt first, since it sends every future matching message to that address.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
addLabelstringLabel(s) to add to matching messages (comma-separated, name or ID)
archivebooleanArchive matching messages (skip inbox)
forwardstringForward to this email address (must be a verified forwarding address)
fromstringMatch messages from this sender
hasAttachmentbooleanMatch messages with attachments
importantbooleanMark as important
markReadbooleanMark matching messages as read
neverSpambooleanNever mark as spam
querystringAdvanced Gmail search query for matching
removeLabelstringLabel(s) to remove from matching messages (comma-separated, name or ID)
starbooleanStar matching messages
subjectstringMatch messages with this subject
tostringMatch messages to this recipient
trashbooleanMove matching messages to trash

gog_gmail_filters_delete

Delete a Gmail filter by ID.

ParameterTypeDescription
filterId *stringFilter ID to delete
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_sendas_list

List all send-as aliases configured for the account.

ParameterTypeDescription
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_sendas_get

Get details of a single send-as alias by its email address.

ParameterTypeDescription
email *stringSend-as alias email address
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_sendas_create

Create a send-as alias. Newly added aliases generally require email verification before they can be used (see gog_gmail_sendas_verify). Google emails the address and the account gains a new identity to send as, so this asks the MCP host to show the user a confirmation prompt with the address, name and reply-to first; nothing is created unless they accept. If the client cannot show that prompt (no MCP elicitation, e.g. claude.ai), a two-step flow applies instead: call WITHOUT confirmToken and nothing is sent or changed — the result has status "confirmation-required", the full preview and a co…

ParameterTypeDescription
email *stringEmail address of the new send-as alias
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
displayNamestringName that appears in the From field
replyTostringReply-to address
signaturestringHTML signature for emails sent from this alias
treatAsAliasbooleanTreat as alias (replies sent from Gmail web)

gog_gmail_sendas_update

Update a send-as alias (display name, reply-to, signature, alias handling, or make it the default).

ParameterTypeDescription
email *stringSend-as alias email address to update
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
displayNamestringName that appears in the From field
makeDefaultbooleanMake this the default send-as address
replyTostringReply-to address
signaturestringHTML signature
treatAsAliasbooleanTreat as alias

gog_gmail_sendas_delete

Delete a send-as alias by its email address.

ParameterTypeDescription
email *stringSend-as alias email address to delete
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_gmail_sendas_verify

Resend the verification email for a send-as alias that is pending verification.

ParameterTypeDescription
email *stringSend-as alias email address to verify
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_upload_slots

HOSTED DEPLOYMENTS: how to give this server a FILE you hold (a photo, a PDF, an .eml). This server runs remotely and cannot read paths on your machine, so call this first with the files' names: it returns one signed upload slot per file. PUT each file's bytes to its uploadUrl (each slot carries a ready `curl` command — replace the <path to …> placeholder; the Content-Type must be exactly the slot's mimeType), then pass the slots' blobKeys in the `blobKeys` parameter of the tool that takes the file: gog_gmail_send, gog_gmail_reply, gog_gmail_reply_all, gog_gmail_drafts_create, gog_gmail_dra…

ParameterTypeDescription
files *arrayOne entry per file: {filename, mimeType?}. The filename is the name the recipient / Drive will show, and its extension is how gog types an attachment — give it the right one.