Skip to main content
Glama
jnpacker

Gmail MCP Server

by jnpacker

Gmail MCP 서버

Gmail 통합을 위해 특별히 제작된 MCP(Model Context Protocol) 서버로, AI 어시스턴트가 읽지 않은 이메일을 검토하고 이메일 관리 작업을 수행할 수 있게 해줍니다.

기능

  • 읽지 않은 이메일 목록: 선택적 제목 필터링을 통해 Gmail 받은편지함에서 읽지 않은 이메일을 가져옵니다

  • 전체 이메일 목록: Gmail에서 모든 이메일을 가져옵니다(기본값은 받은편지함, 전체 메일 옵션 제공)

  • 이메일 검색: 전체 Gmail 검색 구문(from:, to:, subject:, has:attachment, after:, label:, is:starred)을 사용하여 이메일을 검색합니다

  • 이메일 내용: 헤더, 본문, 메타데이터를 포함한 전체 이메일 내용에 접근합니다

  • 이메일 삭제: ID로 이메일을 영구 삭제합니다

  • 이메일 보관: ID로 이메일을 보관합니다(받은편지함에서 제거)

  • 웹 대시보드: 지능적인 받은편지함 관리를 위한 아름답고 반응형 대시보드

  • 자동 분류: 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 대상, 예: test, lint, dashboard)는 첫 실행 시 자동으로 로컬 .venv/를 생성하고 그 안에 프로젝트를 설치합니다. 시스템 전체에 pip install을 할 필요가 없습니다(많은 배포판이 직접 pip install을 거부하는 "외부 관리" 시스템 Python을 제공합니다).

서버를 시작합니다:

.venv/bin/python -m gmail_mcp_server.server

웹 대시보드 및 받은편지함 관리

Gmail MCP 서버에는 자동 분류 및 정리 기능을 갖춘 지능적인 받은편지함 관리를 위한 강력한 웹 기반 대시보드가 포함되어 있습니다.

빠른 시작

대시보드를 시작합니다:

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 실행 시 경로를 지정합니다.

사용 예시

구성이 완료되면 클라이언트 구성에 전달하여 AI 어시스턴트와 함께 Gmail MCP 서버를 사용할 수 있습니다.

대시보드 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 Secret으로 통합됩니다(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.com, has:attachment, subject:report, after:2024/01/01, is:starred, label: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/* 라벨이 자동으로 제거됩니다(이메일당 하나의 라벨 불변성).

매개변수:

  • 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 test, make lint, make format, make auth는 모두 첫 실행 시 자동으로 .venv/(개발 종속성 포함)를 생성하므로 별도의 설정 단계가 없습니다.

테스트 실행:

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

린트 및 포맷:

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