@mcp-z/mcp-gmail
This server provides Gmail automation via MCP, including search, messaging, labels, account management, and CSV export.
Search and read emails with flexible filters (sender, recipient, subject, body, date, labels, categories, read status, attachments, raw Gmail queries)
Send new emails and reply to existing messages, with text or HTML content, CC/BCC support
Manage labels: list system/user labels, add labels to messages, delete user labels, list category labels
Get full message details including attachments, thread info, labels, folder, and read/importance flags
Mark messages as read or move messages to trash (recoverable)
Export matching messages to CSV with streaming pagination and configurable limits
Manage multiple Gmail accounts: view current identity, switch accounts, link/remove accounts, list linked accounts
Supports OAuth (loopback/cloud), service account, and DCR authentication modes
Available over stdio or HTTP MCP transports
Provides tools for searching, reading, sending, and replying to emails, as well as managing labels and exporting messages to CSV through the Gmail API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@mcp-z/mcp-gmailfind recent emails from my manager about budget"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@mcp-z/mcp-gmail
MCP server for Gmail integration with OAuth authentication, message search, batch operations, and Google Sheets export
Common uses
Search and read messages
Send and reply to emails
Manage labels and export messages to CSV
Related MCP server: gmail-mcp
Transports
MCP supports stdio and HTTP.
Stdio
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": ["-y", "@mcp-z/mcp-gmail"]
}
}
}HTTP
{
"mcpServers": {
"gmail": {
"type": "http",
"url": "http://localhost:9002/mcp",
"start": {
"command": "npx",
"args": ["-y", "@mcp-z/mcp-gmail", "--port=9002"]
}
}
}
}start is an extension used by npx @mcp-z/cli up to launch HTTP servers for you.
Create a Google Cloud app
Go to Google Cloud Console.
Create or select a project.
Enable the Gmail API.
Create OAuth 2.0 credentials (Desktop app).
Copy the Client ID and Client Secret.
Select your MCP transport (stdio for local and http for remote) and platform
For stdio, choose "APIs & Services", + Create client, "Desktop app" type
For http, choose "APIs & Services", + Create client, "Web application" type, add your URL (default is http://localhost:3000/oauth/callback based on the --port or PORT)
For local hosting, add "http://127.0.0.1" for Ephemeral redirect URL
Enable OAuth2 scopes: openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://mail.google.com/
Add test emails
OAuth modes
Configure via environment variables or the env block in .mcp.json. See server.json for the full list of options.
Loopback OAuth (default)
Environment variables:
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secretExample (stdio) - Create .mcp.json:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": ["-y", "@mcp-z/mcp-gmail"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id"
}
}
}
}Example (http) - Create .mcp.json:
{
"mcpServers": {
"outlook": {
"type": "http",
"url": "http://localhost:3000",
"start": {
"command": "npx",
"args": ["-y", "@mcp-z/mcp-gmail", "--port=3000"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id"
}
}
}
}
}Local (default): omit REDIRECT_URI → ephemeral loopback. Cloud: set REDIRECT_URI to your public /oauth/callback and expose the service publicly.
Note: start block is a helper in "npx @mcp-z/cli up" for starting an http server from your .mpc.json. See @mcp-z/cli for details.
Service account
Environment variables:
AUTH_MODE=service-account
GOOGLE_SERVICE_ACCOUNT_KEY_FILE=/path/to/service-account.jsonExample:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": ["-y", "@mcp-z/mcp-gmail", "--auth=service-account"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY_FILE": "/path/to/service-account.json"
}
}
}
}DCR (self-hosted)
HTTP only. Requires a public base URL. CSV export and /files are disabled in DCR mode; resourceStoreUri is ignored.
{
"mcpServers": {
"gmail-dcr": {
"command": "npx",
"args": [
"-y",
"@mcp-z/mcp-gmail",
"--auth=dcr",
"--port=3456",
"--base-url=https://oauth.example.com"
],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}How to use
# List tools
mcp-z inspect --servers gmail --tools
# Call a tool
mcp-z call gmail message-search '{"query":"from:alice@example.com"}'Tools
categories-list
label-add
label-delete
labels-list
message-get
message-mark-read
message-move-to-trash
message-respond
message-search
message-send
messages-export-csv
Resources
email
Prompts
draft-email
query-syntax
Configuration reference
See server.json for all supported environment variables, CLI arguments, and defaults.
Storage backends
OAuth tokens (TOKEN_STORE_URI) and DCR registrations (DCR_STORE_URI) are stored through keyv-registry, which picks an adapter from the URI protocol.
file:// (the default, under ~/.mcp-z/) and memory:// work with no extra setup.
Any other backend needs its adapter installed alongside this server. Adapters are resolved with require(), so a globally installed server finds a globally installed adapter:
npm install -g @mcp-z/mcp-gmail @keyv/redis
TOKEN_STORE_URI=redis://localhost:6379 mcp-gmailA protocol whose adapter is missing fails at startup naming the package to install.
Documentation
Available Tools
15 toolsaccount-listA
List all linked mcp-gmail accounts with their aliases and active status.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The verb 'List' strongly implies a read-only, side-effect-free operation, and the description states what will be returned. However, it does not explicitly confirm whether any authentication, refresh, or external network access occurs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that states the action, scope, and relevant output fields with no filler. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no parameters and an output schema available, the short description is fully adequate. It tells the agent exactly what will be returned and is not missing critical information needed to invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema provides no meaning to add. The description compensates by specifying the output fields (aliases and active status) and the scope ('all linked'), which is useful context for an agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and names the exact resource ('all linked mcp-gmail accounts'), adding the aliases and active status fields. This clearly distinguishes account-list from siblings like account-me, account-switch, and account-remove.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'all linked' establishes a clear context: use this when you need the full set of connected accounts rather than the current one. It does not explicitly name alternatives or state when not to use it, but the sibling set makes the distinction reasonably obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
account-meA
Show current mcp-gmail user identity. Returns email, alias (if set), and session expiry information.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It clearly describes what the tool returns and implies a read-only, non-destructive operation through 'Show'. It does not mention authentication or error behavior, but for this simple zero-parameter identity query that is a minor omission.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no filler. The core action is front-loaded, and the return fields are listed compactly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and the presence of an output schema, the description is complete: it states what the tool does and what information it returns. No further context is needed for such a simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the baseline is 4. The description correctly avoids inventing parameter details that do not exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Show) and resource (current mcp-gmail user identity), and lists the returned values: email, alias, and session expiry. The word 'current' helps distinguish it from account-list, account-switch, and account-remove.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies its use: whenever you need the current user identity. However, it never explicitly says when to prefer this over account-list or account-switch, nor does it provide when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
account-removeA
Remove mcp-gmail account and delete stored tokens permanently. If removing the active account, the first remaining account becomes active. Requires email or alias parameter.
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | Email address or alias of account to remove |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers: it warns that stored tokens are deleted permanently, and explains the side effect where the first remaining account becomes active if the active account is removed. This is exactly the kind of destructive-action transparency an agent needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences with zero filler: the primary action and permanence are front-loaded, followed by the active-account edge case and the parameter requirement. Every sentence earns its place and the structure prioritizes the most decision-relevant information first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with an output schema and no annotations, the description covers the essential ground: the destructive action, the active-account edge case, and the required input. Minor gaps remain, such as what happens when the last account is removed, but nothing critical is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the schema already defines accountId as 'Email address or alias of account to remove'. The description's closing sentence ('Requires email or alias parameter') merely restates the schema's required field and its format, adding no new semantic detail beyond the structured data.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Remove') with a clear resource ('mcp-gmail account') and states the permanent consequence ('delete stored tokens permanently'). This clearly distinguishes it from sibling tools like account-switch, account-list, and account-me, which cover different account operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied rather than explicit: the tool is clearly for removing accounts, and the active-account fallback rule gives situational context. However, it never names alternatives or states when-not-to-use it (e.g., when the user only wants to switch accounts rather than delete one), so it stops short of explicit routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
account-switchA
Use mcp-gmail account (smart mode). If email/alias provided and already linked, switches to it without triggering OAuth. If not linked or no email provided, triggers OAuth browser flow to add account. Returns account email, whether it was newly added, and total account count.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | Optional alias for easy identification | |
| No | Email address to link (if already linked, switches without OAuth) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and largely succeeds: it discloses the OAuth trigger, the no-OAuth fast path, and the return payload (account email, newly-added flag, total count). It omits potential blocking/waiting behavior during the OAuth browser flow, but the main side effects are stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact: three sentences cover behavior, conditions, and return values. It is mostly front-loaded, but 'smart mode' is an unexplained term that adds confusion without earning its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists and the two optional parameters are fully documented, the description is reasonably complete. It explains OAuth behavior and return fields, but leaves 'smart mode' undefined and does not mention session-level side effects of switching accounts, which would be useful for an agent deciding whether to call this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, giving a baseline of 3. The description adds meaning by explaining that email/alias can target an already-linked account and switches without OAuth, while absence of an email triggers account addition. This clarifies the relationship between the two optional parameters beyond their individual schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the action (switching to or adding a Gmail account) and the resource (mcp-gmail account). It clearly differentiates from siblings like account-me, account-list, and account-remove by describing its switch/add behavior, though the phrase 'smart mode' is vague and slightly obscures the primary purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit conditional guidance: if an email/alias is already linked, switch without OAuth; if unlinked or no email provided, trigger OAuth. This is clear context for when to use the tool, though it does not name alternative tools for account listing or removal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
categories-listA
List Gmail category labels (CATEGORY_*) with IDs and descriptions.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. The verb 'List' makes the read-only nature clear, and the description states what the tool returns ('IDs and descriptions'). For a simple listing operation, this is sufficient transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that front-loads the action and resource. Every word adds useful information: 'Gmail', 'category labels', 'CATEGORY_*', 'IDs', and 'descriptions'.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a low-complexity, zero-parameter read-only listing tool with an output schema available. The description fully explains what the tool returns and which labels it covers, leaving no critical gap for an agent to successfully select and invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the input schema is empty, so there are no parameter semantics to document. The description does not need to compensate for schema gaps, and the baseline for zero-parameter tools is appropriately 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and identifies the exact resource ('Gmail category labels (CATEGORY_*)') plus the returned fields ('IDs and descriptions'). This clearly distinguishes it from sibling tools like labels-list, which handle user-created labels rather than Gmail's built-in CATEGORY_* labels.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context by specifying that this tool handles Gmail category labels, not ordinary labels. It does not explicitly name alternatives or state when not to use it, but the CATEGORY_* qualifier makes the intended use unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
label-addB
Add a label to a Gmail message
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Gmail message ID to add label to | |
| label | Yes | Label name or ID (use gmail-labels-list to discover available labels) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It states 'Add', implying a mutation, but does not disclose idempotency, prerequisites, whether labels must already exist, or any side effects. The output schema may cover return values, but the description adds no behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. Every word contributes to identifying the operation and target resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity 2-parameter tool with full schema coverage and an output schema, the description is mostly sufficient. It leaves usage routing implicit and could mention that the label must already exist, but the schema hint about gmail-labels-list mitigates this gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear parameter descriptions for both id and label. The description itself does not add parameter-level detail beyond the schema, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Add') and resource ('label to a Gmail message'). It is immediately distinguishable from sibling tools like label-delete and labels-list based on the operation described.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no description-level guidance about when to use this tool versus alternatives. The schema's label parameter mentions using gmail-labels-list to discover labels, but the description itself does not provide when/when-not conditions or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
label-deleteA
Delete Gmail labels permanently (irreversible). System labels (INBOX, SENT, etc.) cannot be deleted.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Gmail label IDs to delete |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries full behavioral disclosure responsibility. It explicitly warns that deletion is permanent and irreversible, and that system labels will not work. It does not mention side effects on messages, but the core risk is well covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first states the action and severity, the second adds the critical system-label exclusion. Every word earns its place, and the most decision-relevant information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-required-parameter tool with an output schema and sibling context, the description supplies the essential operational constraints: irreversible deletion and the inability to delete system labels. It does not explain where label IDs come from, but that is reasonably implied by sibling tools like labels-list.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The sole parameter, ids, is already fully described in the input schema as 'Gmail label IDs to delete.' The description adds little param-specific meaning beyond schema coverage, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Delete Gmail labels permanently.' The irreversibility warning adds important scope, and the tool is immediately distinguishable from label-add, labels-list, and message-move-to-trash.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly communicates when not to use the tool: system labels like INBOX and SENT cannot be deleted. However, it does not explicitly mention alternative sibling tools or broader conditions for when deletion is appropriate, so it lacks a full alternatives-based guideline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
labels-listA
List Gmail labels for label: query syntax. Case-sensitive.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It adds one useful operational detail: case sensitivity. It does not mention read-only status, pagination, authentication, or potential errors, though the output schema likely covers the return shape. The description gives moderate transparency but relies heavily on the tool's simple name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short and front-loaded: 'List Gmail labels' immediately states the action and object. The extra detail about query syntax and case sensitivity is relevant and non-redundant. The only minor issue is the compact phrasing 'for label: query syntax,' which is slightly awkward but not padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter listing tool with an output schema present, the description provides the essential purpose and a key caveat about case sensitivity. It does not confirm exhaustiveness or Gmail-specific limitations, but nothing critical appears missing for selecting and invoking the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the input schema fully documents this with 100% coverage. The description does not need to explain inputs, and the baseline for a zero-parameter tool is 4. No additional parameter context is required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description identifies a specific verb ('List') and resource ('Gmail labels') and ties them to a concrete use case ('label: query syntax'). This distinguishes it from sibling tools like label-add and label-delete. However, the phrasing 'for label: query syntax' is slightly elliptical and could be misread as filtering by label rather than listing labels intended for use in queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool: when an agent needs Gmail label names for constructing label: query syntax. It does not explicitly compare with categories-list or explain when not to use it, leaving some inference to the agent. This is adequate but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
message-getA
Get a Gmail message by ID with flexible field selection
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Gmail message ID to retrieve | |
| fields | No | Comma-separated fields to return. Omit for all fields. Available: id, threadId, subject, from, fromName, to, cc, bcc, date, snippet, body, isRead, isImportant, hasAttachments, attachmentCount, labelIds, folderName | |
| contentType | No | Format for body content: text extracts plain text, html preserves HTML structure | text |
| excludeThreadHistory | No | When true, removes quoted thread history from body content |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. 'Get' signals a read-only operation and 'flexible field selection' indicates configurable output, but it does not disclose details like whether fetching marks the message as read or how omitted fields behave. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It names the action, resource, key constraint, and a meaningful capability all in one concise clause.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a straightforward retrieval tool with a fully documented input schema and an output schema available, the description plus schema covers the essential calling context. It lacks explicit mention of authentication or preconditions, but these are not unusual omissions for a simple read tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all four parameters. The description's phrase 'flexible field selection' aligns with the fields parameter but adds no new semantic detail beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb (Get), names a concrete resource (Gmail message), and identifies the selection mechanism (by ID). It also adds the differentiator 'flexible field selection,' which helps distinguish it from sibling tools like message-search or messages-export-csv.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies the use case: retrieve a single Gmail message when an ID is known. It does not explicitly contrast with alternatives or state when not to use it, but the 'by ID' qualifier provides sufficient context against the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
message-mark-readA
Mark a Gmail message as read
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Gmail message ID to mark as read |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the action but does not disclose effects beyond the phrase itself, such as idempotency, whether state is permanently changed, or any authorization requirements. This leaves behavioral context thin.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler or redundant detail. Every word contributes to the core meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter mutation with an output schema present, the description is mostly sufficient. It could add explicit behavioral notes, but the low complexity and complete schema coverage mean an agent is unlikely to be misled.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: the only parameter, id, is already documented as 'Gmail message ID to mark as read.' The tool description adds no parameter-level meaning beyond the schema, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Mark a Gmail message as read.' It clearly distinguishes from sibling tools like message-move-to-trash and message-get, and leaves no ambiguity about the operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The use case is implied: call this when a message should be marked read. However, the description does not explicitly contrast with alternatives or state when not to use it, so guidance is minimal but present.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
message-move-to-trashA
Move Gmail messages to trash (recoverable).
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Gmail message IDs to move to trash |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It adds the key disclosure that trashing is recoverable, which is useful context beyond the bare operation. It does not detail any permissions or side effects, but the behavior is simple and the recoverable note is the most important trait for an agent to know.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that conveys the action, object, and a behavior qualifier with zero waste. It is concise without losing necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with an output schema and full schema description coverage, the description is sufficiently complete. It explains the action and key behavior, and the schema covers the parameter. A richer note about Gmail's trash retention period could add value but is not essential.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage with a description for the single 'ids' parameter. The tool description adds no additional parameter-related meaning, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Move'), a resource ('Gmail messages'), and a destination ('to trash'), making the tool's function unmistakable. It naturally distinguishes itself from sibling tools like message-get, message-mark-read, label-add, and account tools, none of which involve trashing messages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly sets the context for use: this is the tool for moving Gmail messages into the trash. It does not explicitly name alternatives or exclusions, but the action is distinctive enough among the sibling tools that an agent can infer when to select it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
message-respondB
Send a reply to a Gmail message
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Gmail message ID to reply to | |
| body | Yes | Reply body content (plain text or HTML) | |
| contentType | No | Format of the body content | text |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavior. It indicates a side effect (sending) but does not clarify whether recipients/subject are derived automatically, what happens to the original message, or whether auth/permissions are required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no filler, and the core action is front-loaded. It earns its place entirely.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The schema fully covers parameters and an output schema exists, but the description lacks annotations and adds no behavioral or usage context. For a simple one-action tool this is adequate but leaves nontrivial gaps around selection and side effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The tool description itself adds no parameter-level meaning, but the schema already documents id, body, and contentType, including the enum and default for contentType.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Send a reply') and resource ('a Gmail message'), making the basic purpose clear. It does not explicitly contrast with sibling tools like message-send, though the word 'reply' differentiates it by implication.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus message-send or whether the caller must first fetch the message to obtain an ID. Usage is only implied by the tool name and one-sentence description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
message-searchB
Search Gmail messages using structured query objects with flexible field selection.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Structured query object or JSON string for filtering messages. Use query-syntax prompt for reference and rawGmailQuery for Gmail syntax. | |
| shape | No | Response shape: objects (keyed) or arrays (columnar, matching fields order) | objects |
| fields | No | Comma-separated fields to return. Omit for all fields. Available: id, threadId, subject, from, fromName, to, cc, bcc, date, snippet, body, isRead, isImportant, hasAttachments, attachmentCount, labelIds, folderName | |
| pageSize | No | Number of items per page (default: 50, max: 1000). Accepts numbers or numeric strings. | |
| pageToken | No | Token for retrieving the next page of results (gmail format). Omit for first page. | |
| contentType | No | Format for body content: text extracts plain text, html preserves HTML structure | text |
| excludeThreadHistory | No | When true, removes quoted thread history from body content |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the burden of behavioral disclosure. 'Search' clearly implies a read-only operation, which is useful context. However, the description does not disclose caveats such as the rawGmailQuery bypassing schema validation, response pagination behavior, or that messages are not modified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no filler, and it front-loads the core action ('Search Gmail messages'). It is effective for a surface-level understanding, though it leaves room for more decision-useful detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The schema is rich and an output schema exists, so those cover invocation and return details. The description itself is thin for a tool of this complexity: it doesn't explain when to use this search tool versus message-get, and it omits any mention of raw Gmail query support or the relationship to other Gmail tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all seven parameters thoroughly. The tool description adds only a high-level mention of structured query objects and field selection, which is helpful but not necessary for parameter-level understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches Gmail messages, which distinguishes it from siblings like message-get, message-send, and labels-list. It also mentions structured query objects and flexible field selection, giving a sense of the tool's unique capability. It falls short of a 5 because it doesn't explicitly contrast itself with message-get or other retrieval tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The verb 'Search' implies when to use this tool, but the description provides no explicit guidance on when to prefer it over alternatives like message-get or messages-export-csv. No exclusions, preconditions, or fallback recommendations are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
message-sendC
Send an email message through Gmail
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC recipients. For multiple recipients, use comma-separated: "alice@example.com, bob@example.com" (optional) | |
| to | Yes | Recipient email address(es). For multiple recipients, use comma-separated: "alice@example.com, bob@example.com" | |
| bcc | No | BCC recipients (hidden copy). For multiple recipients, use comma-separated: "alice@example.com, bob@example.com" (optional) | |
| body | Yes | Email body content (plain text or HTML) | |
| subject | No | Message subject | |
| contentType | No | Format of the body content | text |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says an email is sent, with no mention of side effects, authentication requirements, delivery guarantees, or whether sending is reversible. This is comparable to a minimally described mutation tool with no safety context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler or redundancy. It immediately communicates the tool's function and earns its place without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even though an output schema exists and the input schema is well described, the one-sentence description does not address when to send a new message versus replying via message-respond, nor does it set expectations about delivery behavior. Given the sibling set and absent annotations, the context is incomplete for reliable tool selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides 100% coverage, including descriptions for all six parameters, comma-separated formatting for recipients, and the contentType enum. The description itself adds no parameter-specific meaning, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the specific action (send), the resource (email message), and the channel (Gmail), making the core purpose immediately clear. However, it does not explicitly distinguish this from sibling message-respond, which also involves composing an email, so it misses the final point for full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. Sibling tools such as message-respond and message-search are present, but the description never mentions them or clarifies that message-send is for new outbound emails. This leaves the agent to infer the correct usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
messages-export-csvA
Export Gmail messages to CSV with streaming pagination. Returns file URI. Use query-syntax prompt for query reference.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Structured query object or JSON string for filtering messages. Use query-syntax prompt for reference and rawGmailQuery for Gmail syntax. | |
| filename | No | Output filename (default: gmail-messages.csv) | gmail-messages.csv |
| maxItems | No | Maximum messages to export (default: 10000, max: 50000) | |
| contentType | No | Format for body content: text extracts plain text, html preserves HTML structure | text |
| excludeThreadHistory | No | When true, removes quoted thread history from body content |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses two non-obvious behaviors: streaming pagination and returning a file URI rather than inline data. These tell the agent that the operation may be long-running, handles large result sets incrementally, and produces a file reference. It does not explicitly state that the operation is non-destructive, but 'export' strongly implies a read-only action, so this is a strong disclosure given the context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three short clauses, front-loads the core action, and each sentence adds a distinct fact: the operation, the pagination behavior, the return format, and a pointer for constructing queries. There is no redundant wording or unnecessary detail, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with five parameters and a complex query schema, the description plus the detailed schema covers most essentials. The mention of streaming pagination and file URI return addresses two important runtime aspects not obvious from the schema. Minor gaps remain, such as how the returned file URI is intended to be consumed (e.g., temporary link vs persistent file) and when the query-syntax prompt is available, but the presence of an output schema likely covers return-value details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with each of the five parameters (query, filename, maxItems, contentType, excludeThreadHistory) having a detailed description. Per the calibration baseline, this yields a 3 even though the description adds no parameter-level semantics. The mention of a query-syntax prompt is an external reference, not a substitute for the schema's own parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Export Gmail messages to CSV.' This clearly differentiates the tool from sibling tools like message-search or message-get because it specifies the operation (bulk export), the output format (CSV), and the return type (file URI). Even without naming siblings, the agent can confidently identify when this tool is the right one.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit when-to-use guidance or comparison to alternatives. The only usage hint, 'Use query-syntax prompt for query reference,' directs the agent to external documentation for building queries but does not say when to choose this tool over message-search or message-get. The intended use case is only implied by the 'Export... to CSV' phrasing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools are clearly scoped by resource prefix (message-, label-, account-), but categories-list and labels-list both surface label-like data and could be confused. message-send and message-respond also overlap slightly, though the descriptions clarify the reply behavior.
Names follow a consistent resource-action pattern with lowercase hyphenation, such as message-get, label-add, and account-list. Minor inconsistencies exist: labels-list and messages-export-csv use plurals while label-add and message-get use singular, and account-me uses a pronoun instead of a verb.
15 tools sits at the top of the well-scoped range, but each tool covers a meaningful operation across accounts, labels, and messages. There is no obvious filler or redundancy that makes the set feel bloated.
Core message operations are covered well (send, get, search, reply, trash, mark-read), but the label lifecycle is incomplete: there is no way to create a label, and label-add has no counterpart for removing a label from a message. Trash also lacks a restore operation.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A MCP server for Gmail that lets you search, read, and draft emails and replies.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
MCP server for Nylas — read email, calendars, events and contacts, and send email or create events.
MCP server for MailTempo's public free temporary email inboxes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceStreamable HTTP MCP server for Gmail enabling search, read, draft management, and inbox organization.22ISC
- AlicenseNot gradedqualityAmaintenanceMCP server for Gmail that enables searching, reading, archiving, and managing email from any MCP client.431MIT
- FlicenseNot gradedqualityCmaintenanceMulti-account Gmail MCP server for reading threads, managing labels, and creating drafts across multiple Gmail accounts.
- AlicenseAqualityBmaintenanceA local MCP server that provides Gmail tools (search, read, send, draft, label management) while keeping your emails only between your machine and Google, with no third-party access.6MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/mcp-z/mcp-gmail'
If you have feedback or need assistance with the MCP directory API, please join our Discord server