Skip to main content
Glama
gmail-mcp

gmail-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GMAIL_CONFIG_DIRNoRelocates both the default OAuth credentials file and token cache directory.
GMAIL_TOKEN_FILENoPer-process override for the token cache file path.
GMAIL_CREDENTIALS_FILENoPer-process override for the OAuth credentials file path.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
gmail_list_labelsA

List all Gmail labels (folders) in the mailbox. Returns both system labels (INBOX, SENT, etc.) and user-created labels.

Sibling tools: use gmail_list_inbox to list messages from a discovered label, and gmail_manage_labels/gmail_manage_labels_bulk to change labels.

gmail_list_inboxA

List recent messages from inbox or a specific label.

Args: max_results: Maximum number of messages to return (default: 20) label: Label/folder to list from (default: INBOX). Examples: "INBOX", "SENT", "STARRED", or custom labels unread_only: If True, only show unread messages

Discovery: use gmail_list_labels to find valid label names before passing a custom label.

Sibling tools: use gmail_read_email with a returned message_id to inspect a message, or gmail_search_email when label browsing is too broad.

gmail_search_emailsA

Search emails using Gmail query syntax.

Args: query: Gmail search query. Examples: - "from:someone@example.com" - "subject:meeting" - "is:unread" - "has:attachment" - "after:2024/01/01" - "label:work" - "in:sent" - Combine: "from:boss@company.com is:unread after:2024/01/01" max_results: Maximum number of results to return (default: 20)

gmail_read_emailA

Read the full content of an email by its message ID.

Args: message_id: The ID of the message to read (from list or search results)

Discovery: use gmail_list_inbox or gmail_search_email first and pass the returned message_id.

gmail_create_draftA

Compose a new email draft without sending it.

Discovery: run gmail_list_inbox first to obtain to values.

Args: to: Recipient email address(es), comma-separated for multiple subject: Email subject line body: Email body text (plain text) cc: CC recipients, comma-separated (optional) bcc: BCC recipients, comma-separated (optional)

Use this for: starting a new email conversation safely as a draft. NOT for: sending an already-created draft -> see gmail_send_draft. NOT for: replying in an existing thread with a message ID -> see gmail_create_reply_draft. NOT for: finding messages or message IDs before acting → see gmail_search_emails. NOT for: reading existing email content without sending → see gmail_read_email.

gmail_send_draftA

Send an existing Gmail draft by draft ID.

Discovery: create or identify a draft first with gmail_create_draft or gmail_create_reply_draft; those tools return the required confirm_token.

Args: draft_id: Gmail draft ID to send confirm_token: Confirmation token returned by gmail_create_draft or gmail_create_reply_draft

Use this for: the final irreversible send step after draft review. NOT for: composing new message content -> see gmail_create_draft. NOT for: composing a reply draft -> see gmail_create_reply_draft.

gmail_create_reply_draftA

Create a draft reply in an existing email thread without sending it.

Discovery: run gmail_list_inbox first to obtain message_id values.

Args: message_id: The ID of the message to reply to body: Reply body text (plain text) reply_all: If True, reply to all recipients (default: False, reply only to sender)

Use this for: safely composing a reply draft within an existing Gmail thread. NOT for: sending an already-created draft -> see gmail_send_draft. NOT for: composing a new standalone email with explicit recipients and subject -> see gmail_create_draft. NOT for: finding candidate messages or message IDs → see gmail_search_emails. NOT for: reading message content without replying → see gmail_read_email.

gmail_manage_labelsA

Add or remove labels from an email.

Args: message_id: The ID of the message to modify add_labels: Comma-separated labels to add (e.g., "STARRED,IMPORTANT" or "Work,Urgent") remove_labels: Comma-separated labels to remove (e.g., "INBOX,UNREAD")

Common labels: - STARRED: Star the message - IMPORTANT: Mark as important - UNREAD: Mark as unread (remove to mark as read) - INBOX: In inbox (remove to archive) - TRASH: In trash - SPAM: In spam

Discovery: use gmail_list_inbox or gmail_search_email first to find the message_id, and gmail_list_labels to verify custom label names.

Sibling tools: use gmail_manage_labels_bulk for multiple messages.

gmail_manage_labels_bulkA

Add or remove labels on multiple emails with per-message results.

Each item accepts message_id, add_labels, and remove_labels using the same label syntax as gmail_manage_labels. Successful items include their own restore_token for gmail_restore_email.

gmail_delete_emailA

Delete an email (move to trash or permanently delete).

Args: message_id: The ID of the message to delete permanent: If True, permanently delete (cannot be undone). If False, move to trash (default)

Discovery: use gmail_list_inbox, gmail_search_email, or gmail_read_email first to verify the message_id before deleting.

Sibling tool: gmail_delete_filter deletes a filter definition, not a message.

gmail_restore_emailA

Undo gmail_delete_email trash moves or gmail_manage_labels changes.

Args: restore_token: Token returned by gmail_delete_email or gmail_manage_labels

gmail_create_labelA

Idempotently create a Gmail label, including nested names such as Parent/Child.

Visibility is applied only when a new label is created. Allowed message_list_visibility values are show and hide; allowed label_list_visibility values are labelShow, labelShowIfUnread, and labelHide.

Discovery: use gmail_list_labels to inspect names before supplying required name.

Sibling tools: use gmail_create_filter to apply the label automatically, or gmail_list_labels to inspect existing labels.

gmail_create_filterA

Create an idempotent Gmail filter from criteria and label actions.

Label names in add_labels and remove_labels are comma-separated. Missing add labels are created after validation; remove labels must already exist.

Sibling tools: use gmail_create_label to configure label visibility first, gmail_list_filters to inspect definitions, and gmail_delete_filter to remove one.

gmail_list_filtersA

List Gmail filters and annotate their action label IDs with label names.

Sibling tools: use gmail_create_filter to add a definition and gmail_delete_filter to preview or delete a discovered filter. Use gmail_list_labels for label names and gmail_list_inbox for matching messages.

gmail_delete_filterA

Preview or delete a Gmail filter while preserving its raw restore recipe.

Discovery: use gmail_list_filters to find and verify the required filter_id.

The restore recipe must be mapped to gmail_create_filter arguments; raw keys such as from and addLabelIds are not accepted directly. Sibling destructive tool gmail_delete_email deletes messages, not filter definitions.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have crisply distinct scopes, and the descriptions explicitly cross-reference siblings and call out anti-patterns (e.g. create_draft vs create_reply_draft vs send_draft). The only real overlap is between gmail_list_inbox (browse a label) and gmail_search_emails (query), which both return message lists, though the docs steer agents toward the right one. Manage_labels vs manage_labels_bulk and delete_email vs delete_filter are clearly delineated.

Naming Consistency4/5

All names use snake_case with a consistent gmail_ prefix and verb_noun structure (list/create/read/delete/manage). Minor deviations only: gmail_list_inbox names a mailbox section rather than a resource, and pluralization is inconsistent (read_email vs search_emails, list_labels). Nothing that impedes comprehension.

Tool Count5/5

15 tools sits at the top of the well-scoped range and each one maps to a concrete operation (message browse/read/search/delete/restore, label apply, label/filter CRUD, draft compose/send). No redundant or filler tools; bulk label management is justified separately from single-message management.

Completeness4/5

Message lifecycle (list, search, read, label, delete, restore) and filter lifecycle (list, create, delete) are fully covered, with a safe draft-then-send flow. Gaps remain in label lifecycle (no delete or rename label despite gmail_create_label) and draft lifecycle (no list/update/delete draft). These are workable around but are notable absences.

Maintenance

ActivityStale
ResponsivenessNo recent community issues