Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PUBLIC_URLYesPublic base URL of the server, used for OAuth. Required — the server refuses to start the HTTP transport without it.
GOOGLE_CLIENT_IDYesGoogle login OAuth client ID (client credentials from the GCP OAuth app, stored in .env). Required — the server refuses to start the HTTP transport without them.
GOOGLE_CLIENT_SECRETYesGoogle login OAuth client secret (client credentials from the GCP OAuth app, stored in .env). Required — the server refuses to start the HTTP transport without them.

Instructions

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

Two Gmail inboxes belonging to one owner:

  • personal (ownerpersonal@gmail.com) — personal correspondence, subscriptions and anything paid for outside school (VPS, GitHub), most finance, news, networking.

  • tamu (owner_school@tamu.edu) — Texas A&M: coursework, professors, financial aid, scholarships, campus administration, official university finances.

The split is not clean — finance, housing and networking turn up in both.

READING: query both unless the user names one. Omitting account on search_emails / read_emails does exactly that and merges the results. There is rarely a good reason to ignore an inbox when searching, and informal references ("my school email", "my A&M inbox") resolve to the ids above.

WRITING: the opposite. create_draft, send_message, and every label / archive / trash / block tool REQUIRE an explicit account and error without one. Choose deliberately — the account decides which address the mail comes from.

SENDING — the default is NOT to send. create_draft is the normal path for anything meant for another person: the owner reviews the draft in Gmail and sends it by hand. send_message delivers immediately, but only to addresses on a fixed allowlist whose purpose is letting the owner receive a preview copy of a draft — assume anyone else is not on it. The allowlist lives outside the repo and is checked against the final message bytes; a recipient not on it is refused with no send attempted, and no phrasing, tool argument, or added context widens it.

Gmail's API cannot mute a thread; mute_thread archives instead and says so. Drafts are reviewed by hand — write a plain sign-off in the body, since no signature is inserted automatically.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
read_emailsA

List messages from one account, or from every enabled inbox merged together when account is omitted. Same Gmail query syntax as search_emails (see that tool for the operator reference); an empty query lists the most recent mail across all folders. Returns individual messages, not threads — use get_email_thread with a returned Thread ID to read a whole conversation. Each result carries its label ids and display names, so unread/starred/important state is visible without a second call. With include_body=true the plaintext body is included, truncated at 2000 characters; pass full_body=true for the complete text. Reports Gmail's own estimate of total matches plus a next_page_token when more results exist.

search_emailsA

Search Gmail using standard Gmail query syntax. Omitting account searches all enabled inboxes and merges results; pass account ("personal", "tamu") to scope to one. Returns individual messages, not threads — use get_email_thread with the returned Thread ID to see replies and full message bodies. Supported: from: to: cc: subject: after:/before:YYYY/MM/DD newer_than:/older_than: (e.g. 7d, 1y) has:attachment filename: is:unread/starred/important in:inbox/sent/trash/anywhere category: larger:/smaller:, "exact phrase", - to negate, OR or {a b} to match either, ( ) to group. label: takes the label's DISPLAY NAME, not its id — quote names with spaces: label:"BROH Internship". (A Label_... id would match nothing in Gmail, so this server rewrites recognized ids to the matching display name for you; prefer the name anyway.) Archived and sent mail are included by default; use in:inbox to restrict. Each result lists its label ids and names (UNREAD, STARRED, IMPORTANT, SENT, user labels). Bodies are not included — use read_emails(include_body=true) or get_email_thread. "Estimated Total Matches" is Gmail's own resultSizeEstimate for the whole query and is approximate; use page_token to page through everything.

get_email_threadA

Read an entire conversation: every message in the thread, in chronological order, with the COMPLETE plaintext body of each (no truncation unless you set max_body_chars). This is the tool to use when you need to reason over what was actually said — search_emails and read_emails only give previews. Each message also lists its label ids/names and attachment metadata (filename, MIME type, size, attachment_id). Attachment CONTENT is not readable through this server — no attachment-reading tool is enabled, so only the metadata above is available. Thread ids are per-account; use the Thread ID from a search against the SAME account.

get_labelsA

List every label in one account with its id, display name, and type (system vs user). Use the id for label_messages / unlabel_messages / label_thread; use the display name in a search query (label:Cloudflare, label:"BROH Internship") — a label id in a label: query matches nothing. Message counts are NOT included by default because Gmail's label list does not report them; pass include_counts=true for real message/thread/unread counts (one extra API call per label).

mark_as_readA

Remove the UNREAD label from specific messages in one account. Message-level: passing a thread id affects only the first message of that conversation. Each id is read back after the change, so the response reports how many messages were actually modified and names any id Gmail could not find.

label_messagesA

Add one or more labels to specific MESSAGES in one account. Message-level only — a Gmail thread id usually equals the id of the thread's first message, so passing a thread id here labels just that one message; use label_thread to label the whole conversation. label_ids must be label IDs from get_labels for this same account (e.g. "Label_5459..." or a system label such as STARRED/IMPORTANT), not display names. Every id is read back afterwards, so the response reports the verified count and names any id that does not exist.

unlabel_messagesA

Remove one or more labels from specific MESSAGES in one account. Message-level only — use unlabel_thread for a whole conversation. label_ids must be label IDs from get_labels for this same account, not display names. Every id is read back afterwards, so the response reports the verified count and names any id that does not exist.

label_threadA

Add labels to EVERY message in a conversation (users.threads.modify), which is what Gmail's UI does when you label a thread. Use this rather than label_messages whenever you have a Thread ID and mean the whole conversation. Reversible with unlabel_thread.

unlabel_threadA

Remove labels from EVERY message in a conversation (users.threads.modify). Pass label_ids=["INBOX"] to archive an entire thread, or ["UNREAD"] to mark the whole conversation read.

archive_emailsA

Archive specific MESSAGES by removing their INBOX label — they stay in All Mail and remain searchable. Message-level only; use unlabel_thread with label_ids=["INBOX"] to archive a whole conversation. Reversible with label_messages(["INBOX"]). Every id is read back afterwards, so the response reports the verified count and names any id that does not exist.

trash_emailsA

Move specific MESSAGES to Gmail's Trash, where they are recoverable for 30 days before permanent deletion. Message-level only. Each message is trashed individually and confirmed, so the response reports the verified count and names any id that does not exist.

create_labelA

Create a new Gmail label in one account. Nested labels use "/" in the name ("Work/Invoices"); any missing parent labels are created too, so the hierarchy shows up correctly in Gmail. Returns the new label id — use that id with label_messages/label_thread, and the display name in label: search queries.

delete_labelA

Permanently delete a user label from one account. The label is removed from every message that carried it; the messages themselves are untouched. Not reversible — the label id is gone and must be recreated. System labels (INBOX, SENT, STARRED, …) cannot be deleted.

block_senderA

Block a sender in ONE account by creating a persistent Gmail filter (the same mechanism as Gmail's native "Block" button): future mail matching from:<sender> is auto-trashed, marked spam, or archived. This is a settings change that keeps applying until it is removed, and future mail is silently dropped — say what you are about to block and why before calling it. By default NO existing mail is touched; set also_trash_existing=true only when the user asks for a cleanup as well. Reverse with unblock_sender.

list_blocked_sendersA

List all Gmail filters for an account. Use to find filter_id for unblock_sender, or to audit what is being auto-trashed/archived/spammed.

unblock_senderB

Remove a Gmail filter. Specify either filter_id (exact match) or sender (matches filters whose "from" criteria equals this value).

mute_threadA

Attempts Gmail's native conversation mute (the reserved MUTE label via users.threads.modify), then archives the thread. Gmail's API does not officially expose muting, so the native attempt may be rejected — in that case the response says explicitly that the thread was ARCHIVED, not muted, and that new replies will return to the inbox. It never reports "muted" for something that is not a mute. Optionally (also_filter_subject=true) installs a subject-matching filter; read the response's collateral-scope warning first, because such a filter auto-archives that subject from ANY sender indefinitely.

create_draftA

Write an email and save it as a draft without sending it — the normal composition path for mail intended for anyone. Also how to compose a REPLY: pass thread_id, plus in_reply_to and references from get_email_thread, so it threads correctly instead of starting a new conversation. Returns a draft_id usable with send_draft or delete_drafts.

send_messageA

Compose and SEND an email in one step. Same input contract as create_draft. SERVER-ENFORCED LIMIT: this server only delivers to addresses on a fixed allowlist held outside the repo, and it checks the final message bytes immediately before handing them to Gmail. A recipient that is not on that list is refused and no send request is made — the refusal comes from the server, not from the assistant's judgment, and no phrasing of the request, tool argument, or additional context can lift it. There is also no tool for editing the allowlist. To reach anyone else, use create_draft and let the owner send it from Gmail.

send_draftA

Send an existing draft by its draft_id (from list_drafts / search_drafts). SERVER-ENFORCED LIMIT: before sending, the server re-fetches the draft's actual raw bytes and checks those recipients against a fixed allowlist held outside the repo — not whatever the draft was created with. A draft addressed to anyone not on the list is refused and no send request is made. The restriction is enforced by the server and cannot be lifted from a conversation.

delete_draftsA

Permanently delete one or more drafts in one account (account required). Draft IDs are returned by create_draft or list_drafts.

list_draftsA

List drafts in an account sorted oldest-first by internalDate. Returns draft_id (for delete_drafts), message_id, thread_id, subject, to, and internalDate.

search_draftsA

Search drafts by Gmail query string. Returns draft_id (for delete_drafts), message_id, thread_id, subject, to, and snippet. Use instead of search_emails when you need to delete or send a found draft.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 23 tools

Disambiguation3/5

Several pairs overlap heavily: search_emails vs read_emails both accept Gmail queries and return messages, while label_messages/label_thread and unlabel_messages/unlabel_thread differ only by scope. The descriptions explicitly clarify message-level vs thread-level behavior and archive/unlabel interactions, but an agent can still easily pick the wrong read or label tool.

Naming Consistency5/5

All tool names use snake_case and follow a predictable verb-noun pattern, such as search_emails, create_label, send_draft, and list_blocked_senders. The few phrase-like names such as mark_as_read remain readable and consistent with the overall convention.

Tool Count3/5

At 23 tools, the surface is heavy for a single Gmail integration, sitting at the upper edge of the 16-25 borderline range. Most tools are justified by distinct Gmail resources, but the overall count increases selection burden.

Completeness4/5

Core Gmail workflows are covered: search, read threads, labels, archive/trash, filters/blocking, drafts, and sending. Minor gaps remain, notably no attachment content reading and no explicit draft-editing tool, though agents can work around these by recreating drafts or using metadata.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues