gogcli-mcp-gmail
v4.12.0Extended 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.
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email to authorize |
extraScopes | string | Additional 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… |
services | string | Services 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…
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email to authorize |
extraScopes | string | Additional 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… |
services | string | Services 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.
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email being authorized (same as step 1) |
redirectUrl * | string | The 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). |
extraScopes | string | Extra 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. |
services | string | Services 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…
| Parameter | Type | Description |
|---|---|---|
args * | array | Additional positional args and flags |
subcommand * | string | The gog auth subcommand to run, e.g. "alias", "list", "status" |
gog_gmail_search
Search Gmail threads using Gmail query syntax (e.g. "from:alice subject:invoice is:unread"). The query is passed verbatim to Gmail; a bare name token (from:alison) matches per Gmail's own heuristics, a full address (from:alison@example.com) is exact. To match a contact across several addresses, OR them: from:(a@x.com OR b@y.com). Results are ALWAYS newest-first by Gmail's internalDate — the wrapper sorts them, so the first result is the most recent match and a recent message can never be buried below older ones. IMPORTANT — a response carrying "truncated": true is an INCOMPLETE view of the…
| Parameter | Type | Description |
|---|---|---|
query * | string | Gmail search query |
account | string | Google 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. |
all | boolean | Fetch every page instead of one. Removes truncation entirely, at the cost of one API round-trip per page — the reliable way to answer "does any message match?" for a query with few expected hits. |
fromContact | string | Resolve a Google Contact (name or email) to its addresses and AND a from:(addr OR addr) clause onto the query — saves looking the contact up first when you only know who, not which address. |
max | integer | Max results to return (default: 10) |
maxPages | integer | Walk up to this many pages in ONE call and merge the results, instead of returning a single page. Use it for existence questions ("is there any mail matching X?"), which a single page cannot answer. S… |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor 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_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…
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Message ID |
account | string | Google 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. |
format | string | text (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… |
sanitizeContent | boolean | Return 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…
| Parameter | Type | Description |
|---|---|---|
body * | string | Email 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 * | string | Subject line |
to * | string | Recipient(s), comma-separated |
account | string | Google 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. |
attach | array | File 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… |
attachInline | array | Attachments 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… |
bcc | string | BCC recipients, comma-separated |
blobKeys | array | Hosted 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… |
cc | string | CC recipients, comma-separated |
confirmToken | string | ONLY 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… |
quote | boolean | Include 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… |
replyToMessageId | string | Message 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… |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
threadId | string | Thread 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…
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail 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. |
account | string | Google 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. |
attach | array | File 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… |
attachInline | array | Attachments 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… |
autoFromAddressedAlias | boolean | When 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… |
bcc | array | Add or move recipients to Bcc (repeatable) |
blobKeys | array | Hosted 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… |
body | string | Reply 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… |
bodyHtml | string | Reply 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… |
bodyHtmlFile | string | Path 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.… |
cc | array | Add or move recipients to Cc (repeatable) |
confirmToken | string | ONLY 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… |
from | string | Send from this email address (must be a verified send-as alias) |
noQuote | boolean | Do not include the original message quoted below the reply (default: the original is quoted) |
remove | array | Remove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all. |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
subject | string | Override reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread. |
to | array | Add 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…
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail 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. |
account | string | Google 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. |
attach | array | File 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… |
attachInline | array | Attachments 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… |
autoFromAddressedAlias | boolean | When 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… |
bcc | array | Add or move recipients to Bcc (repeatable) |
blobKeys | array | Hosted 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… |
body | string | Reply 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… |
bodyHtml | string | Reply 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… |
bodyHtmlFile | string | Path 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.… |
cc | array | Add or move recipients to Cc (repeatable) |
confirmToken | string | ONLY 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… |
from | string | Send from this email address (must be a verified send-as alias) |
noQuote | boolean | Do not include the original message quoted below the reply (default: the original is quoted) |
remove | array | Remove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all. |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
subject | string | Override reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread. |
to | array | Add 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…
| Parameter | Type | Description |
|---|---|---|
args * | array | Additional positional args and flags |
subcommand * | string | The gog gmail subcommand to run, e.g. "archive", "mark-read", "labels" |
account | string | Google 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).
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail message ID |
account | string | Google 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. |
format | string | Gmail format (default: full) |
pretty | boolean | Pretty-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…
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail message ID |
account | string | Google 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. |
attachmentId | string | The 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… |
attachmentIndex | integer | The 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… |
deliver | string | How 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… |
driveFolder | string | Destination Google Drive folder ID for the uploaded copy (deliver="drive"). |
inlineMaxBytes | integer | Byte 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… |
name | string | Filename override. Defaults to the attachment's real filename from the message metadata; pass this to skip that lookup or force a name. |
out | string | Server-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.
| Parameter | Type | Description |
|---|---|---|
threadIds * | array | One or more thread IDs |
account | string | Google 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).
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
all | boolean | Fetch all pages |
max | number | Max results (default: 100) |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor 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… |
since | string | Start 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).
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
max | number | Max messages when using --query (default: 100) |
messageIds | array | Specific message IDs to act on |
query | string | Gmail search query (alternative to messageIds; acts on all matching) |
thread | boolean | Treat 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.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
max | number | Max messages when using --query (default: 100) |
messageIds | array | Specific message IDs to act on |
query | string | Gmail 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.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
max | number | Max messages when using --query (default: 100) |
messageIds | array | Specific message IDs to act on |
query | string | Gmail search query (alternative to messageIds; acts on all matching) |
gog_gmail_trash
Move messages to trash. Pass either messageIds or a Gmail search query.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
max | number | Max messages when using --query (default: 100) |
messageIds | array | Specific message IDs to act on |
query | string | Gmail search query (alternative to messageIds; acts on all matching) |
gog_gmail_message_modify
Modify labels on a single message (add and/or remove labels).
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail message ID |
account | string | Google 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. |
add | string | Labels to add (comma-separated, name or ID) |
remove | string | Labels 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…
| Parameter | Type | Description |
|---|---|---|
messageIds * | array | Message IDs to permanently delete |
account | string | Google 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. |
confirmToken | string | ONLY 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… |
force | boolean | Required 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).
| Parameter | Type | Description |
|---|---|---|
messageIds * | array | Message IDs to modify |
account | string | Google 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. |
add | string | Labels to add (comma-separated, name or ID) |
remove | string | Labels 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…
| Parameter | Type | Description |
|---|---|---|
threadId * | string | Gmail thread ID |
account | string | Google 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. |
full | boolean | Show full message bodies |
latestN | integer | Return only the most recent N messages in the thread (wrapper-side trim; avoids overflowing context on long threads) |
sanitizeContent | boolean | Strip HTML, remove URLs, omit raw payloads from JSON (largest payload-size reduction) |
snippetsOnly | boolean | Reduce each message to its id, labels, snippet, and key headers (From/To/Cc/Subject/Date), dropping full bodies |
useIndexedAttachmentIds | boolean | Report 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).
| Parameter | Type | Description |
|---|---|---|
threadId * | string | Gmail thread ID |
account | string | Google 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. |
add | string | Labels to add (comma-separated, name or ID) |
remove | string | Labels 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").
| Parameter | Type | Description |
|---|---|---|
threadId * | string | Gmail thread ID |
account | string | Google 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. |
useIndexedAttachmentIds | boolean | Report 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.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
labelIdOrName * | string | Label ID or name (e.g. INBOX, STARRED, or a user-created label) |
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | Label name |
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
labelIdOrName * | string | Current label ID or name |
newName * | string | New label name |
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
labelIdOrName * | string | Label ID or name to delete |
account | string | Google 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).
| Parameter | Type | Description |
|---|---|---|
threadIds * | array | One or more thread IDs |
account | string | Google 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. |
add | string | Labels to add (comma-separated, name or ID) |
remove | string | Labels 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…
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
all | boolean | Fetch all pages |
enrich | boolean | Add 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… |
max | number | Max results (default: 20) |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor 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…
| Parameter | Type | Description |
|---|---|---|
draftIdA * | string | First 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 * | string | Second draft id — conventionally the SUSPECTED REPLACEMENT. |
account | string | Google 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. |
maxDiffLines | integer | Cap 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.
| Parameter | Type | Description |
|---|---|---|
draftId * | string | Draft ID |
account | string | Google 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. |
format | string | text (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). |
useIndexedAttachmentIds | boolean | format 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.
| Parameter | Type | Description |
|---|---|---|
body * | string | 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 * | string | Subject |
account | string | Google 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. |
attach | array | File 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… |
attachInline | array | Attachments 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… |
autoFromAddressedAlias | boolean | When 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… |
bcc | string | BCC recipients (comma-separated). On gog_gmail_drafts_update: omit to keep the draft's current Bcc, pass "" to clear it. |
blobKeys | array | Hosted 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… |
bodyFormat | string | How `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… |
bodyHtml | string | 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 bodyHtmlFile. |
bodyHtmlFile | string | Path 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… |
cc | string | CC recipients (comma-separated). On gog_gmail_drafts_update: omit to keep the draft's current Cc, pass "" to clear it. |
from | string | Send from this email address (must be a verified send-as alias) |
omitRecipients | boolean | Create the draft with no recipients even if to/cc/bcc are supplied — an accidental-send guard. Populate recipients in a later update before sending. |
quote | boolean | Include 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… |
replyAll | boolean | Auto-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… |
replyTo | string | Reply-To header address |
replyToMessageId | string | Reply 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.… |
replyToThreadId | string | Reply 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… |
returnFull | boolean | After writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read. |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
to | string | Recipients (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.
| Parameter | Type | Description |
|---|---|---|
draftId * | string | Draft ID |
account | string | Google 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. |
force | boolean | Required 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…
| Parameter | Type | Description |
|---|---|---|
draftId * | string | Draft ID to send |
account | string | Google 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. |
confirmToken | string | ONLY 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 â…
| Parameter | Type | Description |
|---|---|---|
draftId * | string | The draft to copy. It is read, never modified. |
to * | string | Who receives the copy (comma-separated). |
account | string | Google 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. |
appendText | string | A note added below the draft's body in the copy (plain text; rendered into the HTML part too). |
bcc | string | BCC for the copy (comma-separated). |
cc | string | CC for the copy (comma-separated). |
confirmToken | string | ONLY 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… |
includeQuotedFrom | string | A 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. |
subjectPrefix | string | Prefix 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.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
blobKeys | array | Hosted 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… |
file | string | Path 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… |
internalDateSource | string | Which 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). |
labels | array | Labels 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… |
neverMarkSpam | boolean | Never classify the imported message as spam. |
processForCalendar | boolean | Process 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…
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail message ID to forward |
to * | string | Recipients (comma-separated; required) |
account | string | Google 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. |
bcc | string | BCC recipients (comma-separated) |
cc | string | CC recipients (comma-separated) |
confirmToken | string | ONLY 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… |
from | string | Send from this email address (must be a verified send-as alias) |
note | string | Introductory text above the forwarded message |
noteHtml | string | Introductory 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… |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
skipAttachments | boolean | Do 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…
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail 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. |
account | string | Google 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. |
attach | array | File 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… |
attachInline | array | Attachments 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… |
autoFromAddressedAlias | boolean | When 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… |
bcc | array | Add or move recipients to Bcc (repeatable) |
blobKeys | array | Hosted 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… |
body | string | Reply 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… |
bodyHtml | string | Reply 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… |
bodyHtmlFile | string | Path 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.… |
cc | array | Add or move recipients to Cc (repeatable) |
from | string | Send from this email address (must be a verified send-as alias) |
noQuote | boolean | Do not include the original message quoted below the reply (default: the original is quoted) |
remove | array | Remove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all. |
returnFull | boolean | After writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read. |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
subject | string | Override reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread. |
to | array | Add 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.
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail 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. |
account | string | Google 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. |
attach | array | File 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… |
attachInline | array | Attachments 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… |
autoFromAddressedAlias | boolean | When 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… |
bcc | array | Add or move recipients to Bcc (repeatable) |
blobKeys | array | Hosted 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… |
body | string | Reply 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… |
bodyHtml | string | Reply 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… |
bodyHtmlFile | string | Path 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.… |
cc | array | Add or move recipients to Cc (repeatable) |
from | string | Send from this email address (must be a verified send-as alias) |
noQuote | boolean | Do not include the original message quoted below the reply (default: the original is quoted) |
remove | array | Remove these recipients from all fields (repeatable) — e.g. to drop someone from a reply-all. |
returnFull | boolean | After writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read. |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
subject | string | Override reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread. |
to | array | Add 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.
| Parameter | Type | Description |
|---|---|---|
messageId * | string | Gmail message ID to forward |
account | string | Google 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. |
bcc | string | BCC recipients (comma-separated) |
cc | string | CC recipients (comma-separated) |
from | string | Send from this email address (must be a verified send-as alias) |
note | string | Introductory text above the forwarded message |
noteHtml | string | Introductory 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… |
returnFull | boolean | After writing, re-fetch and return the full stored draft (subject, body, recipients) instead of just the write acknowledgement. Costs one extra read. |
signature | boolean | Append the Gmail signature from the active send-as address |
signatureFile | string | Append 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. |
signatureFrom | string | Append the Gmail signature from this send-as email address |
skipAttachments | boolean | Do not include original attachments |
to | string | Recipients (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…
| Parameter | Type | Description |
|---|---|---|
query * | string | Gmail search query |
account | string | Google 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. |
allowSelf | boolean | Allow replying to messages sent by your own address |
archive | boolean | Archive threads after auto-replying |
body | string | Reply body (plain text; required unless bodyHtml is set) |
bodyHtml | string | Reply body HTML |
confirmToken | string | ONLY 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… |
from | string | Send from this email address (must be a verified send-as alias) |
label | string | Label to add after replying (used for dedupe; default: AutoReplied) |
markRead | boolean | Mark threads as read after auto-replying |
max | number | Max matching messages to inspect (default: 20) |
replyTo | string | Reply-To header address |
skipBulk | boolean | Skip auto-generated/list mail |
subject | string | Override reply subject (default: Re: original subject) |
gog_gmail_messages_search
Search individual messages (not threads) using Gmail query syntax. Returns one result per matching message. Results are ALWAYS newest-first by Gmail's internalDate — the wrapper sorts them, so the first result is the most recent match. IMPORTANT — a response carrying "truncated": true is an INCOMPLETE view of the matches: NEVER report that a message does not exist on the strength of one. Page through it (pass nextPageToken back as `pageToken`), set maxPages to walk several pages in one call, or narrow the query first. If you already know the thread, read it with gog_gmail_thread_get instea…
| Parameter | Type | Description |
|---|---|---|
query * | string | Gmail search query (e.g. "from:alice is:unread has:attachment") |
account | string | Google 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. |
all | boolean | Fetch all pages |
bodyFormat | string | Body format preference when includeBody is set |
full | boolean | Show full message bodies without truncation (implies includeBody) |
includeAttachments | boolean | Include each message's attachment metadata (filename, size, mimeType, id or index). NOT a cheap add-on: like includeBody it makes gog fetch every matching message at format=full, so it costs a full pe… |
includeBody | boolean | Include the decoded message body in each result |
includeRecipients | boolean | Include each message's To, Cc and Bcc in the results. Free: read from headers the search already fetches, no extra API calls. |
max | number | Max results |
maxPages | integer | Walk up to this many pages in ONE call and merge the results, instead of returning a single page. Use it for existence questions ("is there any mail matching X?"), which a single page cannot answer. S… |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor 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… |
sanitizeContent | boolean | Return agent-oriented sanitized content, as gog_gmail_get does: HTML stripped, HTTP(S) URLs removed, header text sanitized. Shrinks includeBody results; the URL removal is lossy, so omit it when you n… |
useIndexedAttachmentIds | boolean | Report each attachment as a 0-based `attachmentIndex` within its message instead of an opaque `attachmentId` (stable across calls, unlike the id). Only has an effect alongside includeAttachments or in… |
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).
| Parameter | Type | Description |
|---|---|---|
labelIdOrName * | string | Label ID or name to restyle |
account | string | Google 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. |
backgroundColor | string | Background color from Gmail's label palette as #RRGGBB |
labelListVisibility | string | Label-list visibility |
messageListVisibility | string | Message-list visibility |
textColor | string | Text color from Gmail's label palette as #RRGGBB |
gog_gmail_vacation_get
Get the current vacation responder (auto-reply) settings.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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…
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
body | string | HTML body of the auto-reply message |
confirmToken | string | ONLY 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… |
contactsOnly | boolean | Only respond to contacts |
disable | boolean | Disable the vacation responder |
domainOnly | boolean | Only respond to senders in the same domain |
enable | boolean | Enable the vacation responder (asks the user first) |
end | string | End time in RFC3339 format (e.g. 2024-12-31T23:59:59Z) |
start | string | Start time in RFC3339 format (e.g. 2024-12-20T00:00:00Z) |
subject | string | Subject line for the auto-reply |
gog_gmail_filters_list
List all Gmail filters for the account.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
filterId * | string | Filter ID |
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
addLabel | string | Label(s) to add to matching messages (comma-separated, name or ID) |
archive | boolean | Archive matching messages (skip inbox) |
forward | string | Forward to this email address (must be a verified forwarding address) |
from | string | Match messages from this sender |
hasAttachment | boolean | Match messages with attachments |
important | boolean | Mark as important |
markRead | boolean | Mark matching messages as read |
neverSpam | boolean | Never mark as spam |
query | string | Advanced Gmail search query for matching |
removeLabel | string | Label(s) to remove from matching messages (comma-separated, name or ID) |
star | boolean | Star matching messages |
subject | string | Match messages with this subject |
to | string | Match messages to this recipient |
trash | boolean | Move matching messages to trash |
gog_gmail_filters_delete
Delete a Gmail filter by ID.
| Parameter | Type | Description |
|---|---|---|
filterId * | string | Filter ID to delete |
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
email * | string | Send-as alias email address |
account | string | Google 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…
| Parameter | Type | Description |
|---|---|---|
email * | string | Email address of the new send-as alias |
account | string | Google 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. |
confirmToken | string | ONLY 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… |
displayName | string | Name that appears in the From field |
replyTo | string | Reply-to address |
signature | string | HTML signature for emails sent from this alias |
treatAsAlias | boolean | Treat 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).
| Parameter | Type | Description |
|---|---|---|
email * | string | Send-as alias email address to update |
account | string | Google 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. |
displayName | string | Name that appears in the From field |
makeDefault | boolean | Make this the default send-as address |
replyTo | string | Reply-to address |
signature | string | HTML signature |
treatAsAlias | boolean | Treat as alias |
gog_gmail_sendas_delete
Delete a send-as alias by its email address.
| Parameter | Type | Description |
|---|---|---|
email * | string | Send-as alias email address to delete |
account | string | Google 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.
| Parameter | Type | Description |
|---|---|---|
email * | string | Send-as alias email address to verify |
account | string | Google 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…
| Parameter | Type | Description |
|---|---|---|
files * | array | One 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. |