Skip to main content
Glama
jnpacker

Gmail MCP Server

by jnpacker

Gmail MCP サーバー

Gmail 連携のための専用 Model Context Protocol (MCP) サーバー。AI アシスタントが未読メールの確認やメール管理操作を実行できるようにします。

機能

  • 未読メールの一覧表示: オプションの件名フィルタリング付きで Gmail 受信トレイの未読メールを取得します

  • 全メールの一覧表示: Gmail からすべてのメールを取得します(デフォルトは受信トレイ、全メールのオプションあり)

  • メールの検索: 完全な Gmail クエリ構文(from:to:subject:has:attachmentafter:label:is:starred)を使用してメールを検索します

  • メールの内容: ヘッダー、本文、メタデータを含む完全なメール内容にアクセスします

  • メールの削除: ID を指定してメールを完全に削除します

  • メールのアーカイブ: ID を指定してメールをアーカイブします(受信トレイから削除)

  • Web ダッシュボード: インテリジェントな受信トレイ管理のための美しくレスポンシブなダッシュボード

  • 自動トリアージ: 15 分ごとにメールを自動分類・整理します

  • 自動クリーンアップ: 重要でないメールのインテリジェントな削除とカレンダー招待のアーカイブ

Related MCP server: Gmail MCP Server

インストール

  1. このリポジトリをクローンします:

git clone <repository-url>
cd gmail-mcp-server
  1. Google OAuth 2.0 認証情報を設定します:

    • Google Cloud Console に移動します

    • 新しいプロジェクトを作成するか、既存のプロジェクトを選択します

    • Gmail API を有効にします

    • OAuth 2.0 認証情報(デスクトップアプリケーション)を作成します

    • 認証情報の JSON ファイルをダウンロードし、プロジェクトのルートに credentials.json として保存します

  2. 認証します(下記の認証を参照):

make auth

個別のインストール手順は不要です。make auth(および Python 依存関係を必要とする他の make ターゲット、例: testlintdashboard)は、初回実行時に自動的にローカルの .venv/ を作成し、プロジェクトをそこにインストールします。システム全体に pip install する必要は一切ありません(多くのディストリビューションでは、直接の pip install を拒否する「外部管理」のシステム Python が提供されています)。

サーバーを起動します:

.venv/bin/python -m gmail_mcp_server.server

Web ダッシュボードと受信トレイ管理

Gmail MCP サーバーには、自動トリアージと整理を備えたインテリジェントな受信トレイ管理のための強力な Web ベースのダッシュボードが含まれています。

クイックスタート

ダッシュボードを起動します:

make dashboard

または手動で:

.venv/bin/python app.py

ダッシュボードは http://localhost:5000 で利用できます。

ダッシュボードの機能

  • 15 分ごとの自動トリアージ: メールを自動的に分類・整理します

  • インテリジェントな整理: 優先度(重要 → 重要 → 情報)でメールをグループ化します

  • 自動クリーンアップ: 重要でないフィールド変更を自動的に削除し、カレンダー招待をアーカイブします

  • リアルタイム統計: メール総数、最終同期時刻、次の同期までのカウントダウンを表示します

  • クイックナビゲーション: メールグループをクリックして Gmail の検索結果をプレビューします

  • レスポンシブデザイン: デスクトップ、タブレット、モバイルデバイスで動作します

  • 手動更新: 更新ボタンでトリアージを即座に実行します

Claude Code での使用

Claude Code を使用する場合、この Gmail MCP サーバーを活用して、開発環境から直接メールを管理できます:

  1. 受信トレイのトリアージ: /triage コマンドを使用して、受信トレイを自動的に整理・クリーンアップします

  2. ワークフローへの統合: Claude Code はメールの内容を分析し、アクションを提案できます

  3. 自動管理: ダッシュボードをバックグラウンドで実行し、コーディング中にメールを管理します

  4. 簡単なアクセス: IDE から離れることなく、整理された受信トレイを確認できます

Claude Code で使用するには:

  1. .mcp.json に MCP サーバーが設定されていることを確認します

  2. Claude Code はメール管理用の Gmail ツールにアクセスできます

  3. 自然言語コマンドを使用してメールを管理します(例: 「これらのスパムメールを削除して」、「カレンダー招待をアーカイブして」)

包括的なダッシュボードのドキュメントについては、DASHBOARD.md を参照してください。

MCP 設定

この Gmail MCP サーバーを Claude または gemini-cli で使用するには、.mcp.json ファイルを設定する必要があります。このファイルは、AI アシスタントに MCP サーバーへの接続方法を指示します。

.mcp.json 設定

ホームディレクトリまたはプロジェクトディレクトリに、以下の設定で .mcp.json ファイルを作成します:

{
  "mcpServers": {
    "gmail": {
      "command": "/path/to/gmail-mcp-server/.venv/bin/python3",
      "args": ["-m", "gmail_mcp_server.server"],
      "cwd": "/path/to/gmail-mcp-server"
    }
  }
}

設定の詳細:

  • command: 使用する Python インタープリター。サーバーがインストールされた依存関係にアクセスできるように、.venv/bin/python3 を指定します(make auth によって自動的に作成されます)。素の python/python3 を使用すると、それらのパッケージがシステム全体にインストールされていない限り、ModuleNotFoundError で失敗します。

  • args: Gmail MCP サーバーモジュールに渡す引数

  • cwd: Gmail MCP サーバーがインストールされている作業ディレクトリ

Claude Desktop の場合: .mcp.json ファイルを Claude Desktop の設定ディレクトリに配置します:

  • macOS: ~/Library/Application Support/Claude/

  • Windows: %APPDATA%\Claude\

  • Linux: ~/.config/claude/

gemini-cli の場合: .mcp.json ファイルをホームディレクトリに配置するか、gemini-cli 実行時にパスを指定します。

使用例

設定が完了すると、クライアント設定で Gmail MCP サーバーを渡すことで、AI アシスタントと一緒に使用できます。

ダッシュボードの PIN セキュリティ

ダッシュボードは 4 桁の PIN で保護できます。設定すると、ダッシュボードは新しいセッションごとに PIN 入力画面を表示します(セッションは 4 時間有効です)。

PIN の設定

make set-pin
# Enter new PIN: ****
# Confirm PIN: ****
# PIN saved.

または Python CLI を直接使用します:

python3 app.py --set-pin

これにより、PBKDF2-SHA256 でハッシュ化された PIN がプロジェクトルートの .pincode に書き込まれます。生の PIN は保存されません。.pincode.flask_secret はどちらも gitignore されています。

PIN 保護を解除するには、.pincode を削除します:

rm .pincode

Kubernetes での実行

すべてのシークレットは、単一の gmail-mcp-secrets Kubernetes シークレットに統合されています(k8s/secret.yaml_example を参照)。PIN 保護を使用する場合は、ディスク上で生成するのではなく、事前にハッシュ化された .pincode 値をそこに含めます。

1. PIN ハッシュをローカルで生成します:

make set-pin        # writes .pincode to repo root
cat .pincode        # copy the "salt:hash" string

または直接生成します:

python3 -c "
import secrets, hashlib
pin = '1234'  # replace with your PIN
salt = secrets.token_hex(16)
h = hashlib.pbkdf2_hmac('sha256', pin.encode(), salt.encode(), 260000).hex()
print(f'{salt}:{h}')
"

2. 他のシークレットと一緒に k8s/secret.yaml に追加します:

stringData:
  .pincode: "salt:hash-from-above"
  FLASK_SECRET_KEY: "$(python3 -c 'import secrets; print(secrets.token_hex(32))')"
  # ... other fields from k8s/secret.yaml_example

3. 適用してデプロイします:

kubectl apply -f k8s/secret.yaml
kubectl apply -f k8s/deployment.yaml

エントリポイントは、読み取り専用の /secrets/ マウントから /app/.pincode をコピーします。FLASK_SECRET_KEY は環境変数として注入され、ポッド再起動後もセッションを安定させます。

Make コマンド

付属の Makefile を使用して、一般的なタスクにすばやくアクセスできます:

# Display available commands
make help

# Initialize Gmail OAuth authentication (requires credentials.json)
make auth

# Set or change the dashboard PIN
make set-pin

# Start the web dashboard
make dashboard

# Stop the running dashboard
make kill-dashboard

# Run inbox triage once (email classification and organization)
make triage

# Watch inbox every 10 minutes (runs triage repeatedly)
make watch

MODEL 変数で使用する Claude モデルを指定できます:

make triage MODEL=haiku        # Fast triage with Haiku (default)
make triage MODEL=sonnet       # Balanced triage with Sonnet
make triage MODEL=opus         # Most capable triage with Opus
make watch MODEL=opus

利用可能なツール

1. list_unread_emails

Gmail 受信トレイの未読メールをオプションのフィルタリング付きで一覧表示します。削除/アーカイブ/変更ツールで使用されるインメモリの位置マップを再構築します。

パラメータ:

  • subject_filter(オプション): 件名テキストでメールをフィルタリングします

  • max_results(オプション): 返すメールの最大数(デフォルト: 50)

2. list_all_emails

Gmail のメールを一覧表示します(デフォルトは受信トレイ、既読・未読の両方を含む)。インメモリの位置マップを再構築します。

パラメータ:

  • inbox_only(オプション): 現在受信トレイにあるメールのみを一覧表示するかどうか(デフォルト: true)。false に設定すると、すべてのフォルダのすべてのメールを一覧表示します。

  • max_results(オプション): 返すメールの最大数(デフォルト: 50)

標準の Gmail 検索クエリ構文を使用してメールを検索します。インメモリの位置マップを再構築します。

パラメータ:

  • query(必須): Gmail 検索クエリ文字列(例: from:user@example.comhas:attachmentsubject:reportafter:2024/01/01is:starredlabel:work

  • max_results(オプション): 返すメールの最大数(デフォルト: 50)

4. delete_emails

メールをゴミ箱に移動し、既読としてマークします。最後のメール一覧/検索呼び出しからの位置番号および/または明示的な Gmail メッセージ ID を受け入れます。

パラメータ:

  • positions(オプション): メール一覧からの 1 から始まる位置番号の配列

  • message_ids(オプション): Gmail メッセージ ID の配列

5. archive_emails

メールをアーカイブし(受信トレイから削除)、既読としてマークします。

パラメータ:

  • positions(オプション): 1 から始まる位置番号の配列

  • message_ids(オプション): Gmail メッセージ ID の配列

6. list_labels

すべての Gmail ラベル(システム + ユーザー定義)を返します。

パラメータ: なし

7. create_label

オプションの色付きで新しい Gmail ラベルを作成します。

パラメータ:

  • name(必須): ラベル名(例: Triage/Security

  • background_color(オプション): 16 進数の色(例: #4a86e8)— 事前定義された Gmail カラーである必要があります

  • text_color(オプション): 16 進数のテキスト色 — background_color とペアにする必要があります

8. modify_labels

メールにラベルを追加および/または削除します。Triage/* ラベルを追加する場合、そのメールの他のすべての Triage/* ラベルは自動的に削除されます(メールごとに 1 ラベルの不変条件)。

パラメータ:

  • positions(オプション): 1 から始まる位置番号の配列

  • message_ids(オプション): Gmail メッセージ ID の配列

  • add_labels(オプション): 追加するラベル名の配列

  • remove_labels(オプション): 削除するラベル名の配列

9. list_recent_actions

最近のメール操作のインメモリログを返します(最大 100 件)。

パラメータ:

  • limit(オプション): 返すアクションの最大数(デフォルト: 10)

認証

初期設定

初回実行時、サーバーは認証を必要とします。付属の認証ヘルパーを使用します:

make auth

これにより、認証フローを実行する前に .venv が自動的に作成され(存在しない場合)、依存関係がそこにインストールされるため、手動の pip install 手順は不要です。

または、プロジェクトの virtualenv を使用して手動で:

.venv/bin/python -m gmail_mcp_server.auth

これにより:

  1. credentials.json がプロジェクトルートに存在することを確認します

  2. OAuth 2.0 認証用のブラウザウィンドウを開きます

  3. Gmail アカウントへのアクセス許可を要求します

  4. 認証トークンを将来の使用のために token.json に保存します

認証情報の取得

make auth を実行する前に、Google OAuth 2.0 認証情報を設定する必要があります:

  1. Google Cloud Console に移動します

  2. 新しいプロジェクトを作成するか、既存のプロジェクトを選択します

  3. Gmail API を有効にします

  4. OAuth 2.0 認証情報(デスクトップアプリケーション)を作成します

  5. 認証情報の JSON ファイルをダウンロードし、プロジェクトのルートに credentials.json として保存します

仕組み

  • サーバーは起動時に既存の認証トークン(token.json)を確認します

  • トークンが存在し有効な場合、サーバーは自動的にそれを使用します

  • トークンが期限切れでもリフレッシュトークンがある場合、自動的にリフレッシュします

  • トークンが存在しない場合、サーバーは make auth コマンドを使用して認証を要求します

必要な Gmail API スコープ

  • https://www.googleapis.com/auth/gmail.readonly - メールの読み取り

  • https://www.googleapis.com/auth/gmail.modify - メールの削除とアーカイブ

セキュリティに関する注意

  • credentials.jsontoken.json ファイルを安全に保管してください

  • これらのファイルは git によって自動的に無視されます

  • サーバーは必要な最小限の権限のみを要求します

  • すべての操作は公式の Gmail API を通じて実行されます

開発

make testmake lintmake formatmake auth はすべて、初回実行時に自動的に .venv/(開発依存関係を含む)を作成するため、個別のセットアップ手順はありません。

テストを実行します:

make test          # run all tests
make test-cov      # run with coverage report

Lint とフォーマット:

make lint          # check with ruff
make format        # auto-format and fix imports with ruff

MCP サーバーを直接実行します:

.venv/bin/python -m gmail_mcp_server        # short form (via __main__.py)
.venv/bin/python -m gmail_mcp_server.server # explicit
.venv/bin/gmail-mcp-server                  # installed entry point

MCP Inspector でサーバーを対話的にテストします:

npx @modelcontextprotocol/inspector .venv/bin/python3 -m gmail_mcp_server.server

Available Tools

7 tools
archive_emailsA

Archive emails (remove from inbox). Accepts positions[] from email list and/or message_ids[].

ParametersJSON Schema
NameRequiredDescriptionDefault
positionsNoPosition numbers from the email list
message_idsNoGmail message IDs

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It states the tool removes emails from inbox but does not disclose whether the action is reversible, permission requirements, or potential side effects (e.g., label changes). For a mutation tool, this is insufficient transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence that front-loads the action and then concisely lists the accepted inputs. No extraneous words or repetitions; every phrase earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two fully described parameters and no output schema, the description covers the essential purpose and input relationship. It could be enhanced by mentioning the return value (e.g., success status or count), but the current level is adequate for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for both parameters, but the description adds value by noting positions come from an email list (linking to sibling tool list_unread_emails) and that positions and message_ids are alternatives. This contextual information enhances the schema's basic definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (archive emails) and the resource (remove from inbox), and it distinguishes from siblings like delete_emails by specifying it only removes from inbox. It also explicitly mentions the two input methods, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for moving emails out of inbox but does not explicitly state when to use this tool vs alternatives like delete_emails or modify_labels. No exclusions or prerequisites are provided, leaving the agent to infer usage context from sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_labelC

Create a new Gmail label

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe label name to create
text_colorNoHex text color (e.g. '#ffffff'). Must be used with background_color. Only predefined Gmail colors are accepted.
background_colorNoHex background color (e.g. '#4a86e8'). Must be used with text_color. Only predefined Gmail colors are accepted.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full responsibility for behavioral disclosure. It merely states the action without revealing what happens upon success or failure (e.g., duplicate label behavior, color validation, return value). This is a significant gap for a creation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key action. It could be slightly expanded with usage hints without losing conciseness, but it is not overly verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema and annotations, the description should provide more context about the tool's behavior, such as whether it returns the created label, any side effects, or error conditions. The current text is insufficient for a complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% description coverage for all three parameters, so the description adds minimal value beyond the schema. It correctly implies that 'name' is the label name, but does not elaborate on color constraints or usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Create' and the resource 'Gmail label', making the tool's purpose straightforward. However, it does not explicitly distinguish it from sibling tools like 'modify_labels' or 'list_labels', though the name itself provides some differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. For example, it does not mention that 'modify_labels' could be used to update existing labels, nor does it specify prerequisites or context for creation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_emailsA

Move emails to trash and mark as read. Accepts positions[] from email list and/or message_ids[].

ParametersJSON Schema
NameRequiredDescriptionDefault
positionsNoPosition numbers from the email list
message_idsNoGmail message IDs

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the burden of behavioral disclosure. It states the tool moves emails to trash and marks them as read, which are key effects. However, it does not mention whether the action is reversible (e.g., Gmail trash recovery) or any side effects like batch limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short, front-loaded sentences with no unnecessary words. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (delete), and the description covers the core action and parameters. However, it lacks details about return behavior, error handling, or batch limitations, which would be helpful given no output schema or annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already describes both parameters. The description adds value by clarifying that positions[] and message_ids[] can be used 'and/or' together, indicating they are alternative or complementary ways to specify emails.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Move emails to trash and mark as read,' specifying the verb (move/trash, mark) and resource (emails). It distinguishes from sibling tools like archive_emails (which archives rather than trashes) and list_unread_emails (which lists).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used to delete emails but does not explicitly state when to use this tool versus alternatives like archive_emails or modify_labels. No when-not-to-use or prerequisite guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_labelsB

List all Gmail labels

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It only states 'List all Gmail labels', but does not confirm it is read-only, describe output format, or mention any rate limits or permissions. For a zero-annotation tool, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded and contains no unnecessary words. It is concise and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no annotations, and zero parameters, the description is adequate for a simple list operation. However, it does not provide any context about pagination, result format, or relationship to sibling tools like create_label. It is minimally complete but not enriching.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so schema coverage is 100% trivially. The description adds no additional meaning beyond the schema. Baseline for 0 params is 4, but the description is minimal and does not enrich the agent's understanding of the tool's behavior or output.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all Gmail labels, which is a specific verb+resource. It distinguishes from siblings like list_unread_emails (lists emails) and list_recent_actions (actions, not labels). However, it does not explicitly differentiate from create_label or modify_labels, which operate on labels but are different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. For example, before creating a label with create_label, an agent might need to list existing labels to avoid duplicates, but this is not mentioned. No exclusions or context cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_recent_actionsB

Show recent actions taken on emails (delete, archive, label changes, etc.)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent actions to show (default: 20)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states the tool shows recent actions, but does not disclose behavioral traits like authentication requirements, action types scope, time range, sorting, or any side effects. Significant lack of transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the verb and resource. No filler words; every part serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one parameter and no output schema, the description is adequate but not fully complete. It mentions action types, but lacks details on output format, sorting, time range, or pagination. Leaves some ambiguity for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with one parameter 'limit' having a default and description. The description adds no additional meaning beyond what the schema provides. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('show') and the resource ('recent actions on emails'), with specific examples (delete, archive, label changes). This distinguishes it from sibling tools like list_unread_emails (which shows emails, not actions) and delete/archive tools (which perform actions).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs. alternatives. It does not mention when not to use it or provide any conditions. The context from sibling tools only implicitly implies viewing, but no clear usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_unread_emailsA

List unread emails in Gmail inbox with optional subject filtering

ParametersJSON Schema
NameRequiredDescriptionDefault
max_resultsNoMaximum number of emails to return (default: 50)
subject_filterNoOptional filter to search for emails with specific subject content

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the burden of disclosing behavior. It indicates a read operation but does not explicitly state it is read-only, nor does it mention pagination, rate limits, or other behavioral traits. Basic transparency is achieved but gaps remain.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with key information, no wasted words. Perfectly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should at least hint at what is returned (e.g., email metadata). It fails to mention return format, fields, or behavior on empty results. For a list tool, this is a significant gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds no additional meaning beyond what the schema already provides for each parameter. The mention of 'subject filtering' is redundant with the schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and the resource 'unread emails in Gmail inbox' with an optional filter. It distinguishes itself from sibling tools like delete_emails and archive_emails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing unread emails but does not explicitly state when to use this tool versus alternatives (e.g., when to use list_unread_emails vs list_recent_actions). No when-not guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

modify_labelsA

Batch add/remove labels on emails. Accepts positions[] and/or message_ids[], plus add_labels[] and/or remove_labels[] (label names). When adding a Triage/* label, all other Triage/* labels on the email are automatically removed.

ParametersJSON Schema
NameRequiredDescriptionDefault
positionsNoPosition numbers from the email list
add_labelsNoLabel names to add
message_idsNoGmail message IDs
remove_labelsNoLabel names to remove

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses key behavioral traits: batch operation, parameter flexibility, and the automatic removal of other Triage/* labels when adding one. However, it does not mention idempotency, error conditions, or side effects beyond labeling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (two sentences) and front-loaded with the main action. Every sentence adds value: first defines the operation, second specifies parameter usage and a critical behavioral rule.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 parameters, no output schema), the description covers the core operation and a notable edge case. It does not explain return values or error handling, but for a label mutation tool, the behavioral details are adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, but the description adds value by clarifying that positions[] and message_ids[] are alternative identifiers, and add_labels/remove_labels refer to label names. It also introduces the Triage/* auto-removal logic, which is not in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: batch add/remove labels on emails. It specifies the action (modify labels), resource (emails), and unique behavior (Triage/* auto-removal), distinguishing it from sibling tools like list_labels (read-only) and create_label (single label creation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for batch label operations but lacks explicit when-to-use or when-not-to-use guidance. It does not mention alternatives or prerequisites, though the Triage/* rule provides a specific conditional guideline.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool serves a unique function: listing unread emails, deleting, archiving, managing labels, and viewing recent actions. No two tools have overlapping purposes; even delete_emails and archive_emails are clearly distinguished by their actions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_unread_emails, create_label, modify_labels). The naming is predictable and makes the action-resource relationship clear.

Tool Count5/5

With 7 tools, the server is well-scoped for basic Gmail inbox management and label operations. Each tool addresses a necessary operation without redundancy or unnecessary complexity.

Completeness3/5

The tool set covers core inbox operations (list, delete, archive) and label management (list, create, modify), but lacks essential features like sending emails, reading full email content, searching beyond unread, or marking read/unread. Gaps exist for a full email workflow.

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage Gmail by reading unread emails with automatic classification, creating AI-generated draft replies, and saving drafts directly to Gmail through the Gmail API.
    215
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Gmail accounts for reading unread emails, creating draft replies with proper threading, and managing messages, with optional professional writing guidelines, templates, and Google Docs/Calendar integration.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage Gmail through natural language interactions, including sending, reading, searching emails, and managing labels with auto authentication support.
    20,627
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to manage Gmail through natural language, including sending, reading, searching, labeling emails, managing attachments, and performing thread operations.
    3
    MIT

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/jnpacker/gmail-mcp-server'

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