Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoLogin server port, 8462 by default8462
ISSUERNoPublic origin of the login server
UPSTREAMNoMCP server URL, http://127.0.0.1:8460 by defaulthttp://127.0.0.1:8460
CONFIG_DIRNoWhere the password, token and OAuth database live
MCP_PUBLIC_URLNoPublic address, used to advertise the icon
GMAIL_ACCOUNT_LABELNoName for the mailbox, shown in the server's instructions
GMAIL_CREDENTIALS_DIRNoDirectory holding credentials.json and gcp-oauth.keys.json

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_profileA

Which mailbox this server serves, and how much is in it.

Worth calling first when more than one Gmail connector is set up, so a reply goes to the right account.

gmail_searchA

Search the mailbox using Gmail's own query syntax.

Takes the same operators as the Gmail search box: from:, to:, subject:, has:attachment, is:unread, label:, after:, before:, newer_than:7d. An empty query lists the most recent mail.

Returns headers and a snippet per message, not bodies. Follow with gmail_get_message for one, or gmail_get_thread for the conversation.

Args: query: Gmail search expression, e.g. "is:unread from:client.com". limit: Maximum messages to return, up to 100. include_spam: Include spam and trash, which are excluded by default.

gmail_get_messageA

One message in full, including its body text.

Args: message_id: Message id from gmail_search.

gmail_get_threadA

A whole conversation, oldest message first.

Read this before replying: a thread's later messages often change what the first one asked for.

Args: thread_id: Thread id from gmail_search or gmail_get_message.

gmail_list_attachmentsA

What is attached to a message: filenames, types and sizes.

Args: message_id: Message id from gmail_search.

gmail_list_labelsA

Every label, with its id. Label ids are what the filing tools take.

gmail_create_labelB

Create a label. Use Parent/Child to nest it.

Args: name: Label name.

gmail_delete_labelA

Delete a label. Messages keep their content but lose the label.

Args: label_id: Label id from gmail_list_labels.

gmail_modify_labelsA

Add or remove labels on a message.

The system labels are INBOX, UNREAD, STARRED, IMPORTANT, SPAM and TRASH. Removing INBOX archives a message; removing UNREAD marks it read.

Args: message_id: Message to file. add: Label ids to add. remove: Label ids to remove.

gmail_archiveA

Archive a message by taking it out of the inbox. Nothing is deleted.

Args: message_id: Message to archive.

gmail_mark_readA

Mark a message read, or unread with read=false.

Args: message_id: Message to mark. read: True marks it read, False marks it unread.

gmail_trashB

Move a message to the trash, where Gmail keeps it for 30 days.

Args: message_id: Message to trash.

gmail_untrashA

Take a message back out of the trash.

Args: message_id: Message to restore.

gmail_list_draftsC

Drafts waiting in the mailbox.

Args: limit: Maximum drafts to return, up to 100.

gmail_get_draftA

One draft in full, including its body.

Args: draft_id: Draft id from gmail_list_drafts.

gmail_create_draftA

Write a draft. It waits in the mailbox until a person sends it.

Passing reply_to_message_id threads the draft onto that message and sets the reply headers, so it appears in the conversation rather than as a new one.

Args: to: Recipient address, or several separated by commas. subject: Subject line. body: Plain text body. cc: Carbon copy addresses. bcc: Blind carbon copy addresses. reply_to_message_id: Message this replies to.

gmail_update_draftA

Replace a draft's contents. Gmail rewrites the whole message, so pass every field, not only the changed one.

Args: draft_id: Draft to replace. to: Recipient address. subject: Subject line. body: Plain text body. cc: Carbon copy addresses. bcc: Blind carbon copy addresses.

gmail_delete_draftB

Discard a draft.

Args: draft_id: Draft to delete.

gmail_send_draftA

Send an existing draft. This reaches other people and cannot be undone.

Show the draft and get an explicit yes before calling this. Sending is not a step in a plan; it is the thing the person decides.

Args: draft_id: Draft to send.

gmail_send_messageA

Compose and send in one step. This reaches other people immediately and cannot be undone.

Prefer gmail_create_draft, then gmail_send_draft once the text has been read and approved. Use this only when told to send outright.

Args: to: Recipient address, or several separated by commas. subject: Subject line. body: Plain text body. cc: Carbon copy addresses. bcc: Blind carbon copy addresses.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rollecode/gmail-second-account-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server