claude-code - 💡(How to fix) Fix [FEATURE] Gmail MCP: Add draft reading and modification tools for iterative email composition [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45207Fetched 2026-04-09 08:10:46
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

The native Claude Gmail connector currently provides gmail_create_draft but lacks the ability to read existing drafts or update them. This creates a critical gap in Claude Cowork's email composition workflow, where iterative brainstorming with Claude may refine and improve draft emails, but Claude cannot see or modify what's already been written, including through its own session.

Error Message

  1. What the issue is (with specific error codes)
  • Error handling: Clear errors if updating a draft that was already sent or deleted

Root Cause

Claude: "The technical section is too vague. I suggest restructuring it into three parts: 1. What the issue is (with specific error codes) 2. Why it happened (root cause) 3. Our resolution steps"

Fix Action

Fix / Workaround

Workarounds

Currently, the only workaround is:

  1. Claude creates a draft via gmail_create_draft
  2. I manually open the draft in Gmail
  3. I read Claude's suggestions aloud or copy them manually
  4. I edit the draft in Gmail UI
  5. I paste the updated text back to Claude for another iteration

Code Example

User: "Draft a response to this complex customer issue about billing and compliance."
Claude: Creates draft with initial response via gmail_create_draft()

User: "Read the draft back to me and let's refine the technical explanation."
Claude: Reads draft via gmail_read_draft() and analyzes it

Claude: "The technical section is too vague. I suggest restructuring it into three parts:
         1. What the issue is (with specific error codes)
         2. Why it happened (root cause)
         3. Our resolution steps"

User: "Yes, apply that restructuring."
Claude: Updates the draft via gmail_update_draft() with the improved structure

User: "Ready to send"
[User opens Gmail and sends the refined draft]
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

[Feature Request] Gmail MCP: Add draft reading and modification tools for iterative email composition

Summary

The native Claude Gmail connector currently provides gmail_create_draft but lacks the ability to read existing drafts or update them. This creates a critical gap in Claude Cowork's email composition workflow, where iterative brainstorming with Claude may refine and improve draft emails, but Claude cannot see or modify what's already been written, including through its own session.

Use Case

I'm using Claude Cowork to compose professional email replies to complex issues:

  1. I create an initial draft in Gmail or via gmail_create_draft
  2. I have Claude analyze the draft and brainstorm improvements (tone, clarity, completeness, technical accuracy)
  3. Claude identifies issues and suggests revisions (stronger language, added context, restructured paragraphs, etc.)
  4. I want Claude to apply those revisions directly to the draft instead of me copy-pasting suggested text back into Gmail manually

Current workflow (broken):

  • Claude creates a draft via API
  • I open it in Gmail to review
  • Claude cannot read it back
  • I manually edit in Gmail UI
  • Claude cannot see my changes or the current state
  • Next iteration requires manual copy-paste

Desired workflow (with feature):

  • Claude creates or retrieves a draft
  • Claude reads the current draft content
  • I ask Claude to revise it
  • Claude updates the draft with improvements
  • The improved draft is ready for me to send in Gmail

Current Limitations

The native Gmail MCP connector provides:

  • gmail_create_draft – Create new drafts
  • No gmail_read_draft – Cannot read existing draft content
  • No gmail_update_draft – Cannot modify draft content
  • gmail_list_drafts – List drafts (metadata only, no content)

This is fundamentally different from the message tools:

  • gmail_read_message – Read sent/received email content
  • gmail_read_thread – Read conversation threads

But for drafts:

  • ❌ No equivalent read capability
  • ❌ No equivalent update capability

Proposed Solution

Requested Features

1. Read Draft Content

  • Function: gmail_read_draft
  • Parameters:
    • draftId (string, required) – Draft ID (from gmail_list_drafts)
  • Returns:
    • Full draft details: to, cc, bcc, subject, body, contentType, attachments, threadId (if reply)
  • Use case: Retrieve the current state of a draft for analysis and revision

2. Update Draft Content

  • Function: gmail_update_draft
  • Parameters:
    • draftId (string, required) – Draft ID to update
    • body (string, optional) – New email body
    • subject (string, optional) – New subject line
    • to (string, optional) – New recipient(s)
    • cc (string, optional) – New CC recipient(s)
    • bcc (string, optional) – New BCC recipient(s)
    • contentType (enum, optional) – text/plain or text/html
  • Returns:
    • Updated draft details with confirmation
  • Use case: Apply Claude's revisions to the draft after iteration

Technical Context

  • The Gmail API supports these operations via gmail.users.drafts.get() and gmail.users.drafts.update()
  • Draft retrieval returns the same message structure as gmail.users.messages.get() with the draft wrapper
  • Draft updates are performed by modifying the message payload and re-saving
  • This is standard Gmail API functionality already in use by mail clients (Thunderbird, Outlook, etc.)

Impact

Without this feature: Email composition workflows are fragmented; Claude can create but not iteratively improve drafts, forcing manual editing in Gmail UI between Claude refinement passes.

With this feature: Claude Cowork becomes a powerful collaborative writing tool for email composition:

  • Iterative refinement: Claude reads draft → suggests improvements → applies them → ready to send
  • Tone/style consistency: Claude analyzes draft against your writing patterns and refines
  • Complex reply composition: Brainstorm and co-author detailed technical or delicate responses
  • Draft recovery: If a complex draft is lost, Claude can reconstruct it from earlier versions or context

Alternative Solutions

Workarounds

Currently, the only workaround is:

  1. Claude creates a draft via gmail_create_draft
  2. I manually open the draft in Gmail
  3. I read Claude's suggestions aloud or copy them manually
  4. I edit the draft in Gmail UI
  5. I paste the updated text back to Claude for another iteration

This defeats the purpose of agentic automation and makes the workflow extremely tedious for complex email composition.

Priority

High - Significant impact on productivity

Feature Category

MCP server integration

Use Case Example

Example Workflow

User: "Draft a response to this complex customer issue about billing and compliance."
Claude: Creates draft with initial response via gmail_create_draft()

User: "Read the draft back to me and let's refine the technical explanation."
Claude: Reads draft via gmail_read_draft() and analyzes it

Claude: "The technical section is too vague. I suggest restructuring it into three parts:
         1. What the issue is (with specific error codes)
         2. Why it happened (root cause)
         3. Our resolution steps"

User: "Yes, apply that restructuring."
Claude: Updates the draft via gmail_update_draft() with the improved structure

User: "Ready to send"
[User opens Gmail and sends the refined draft]

Additional Context

Additional Notes

  • Draft updates should preserve the threadId if the draft is a reply
  • Attachment handling: Read operations should list attachments (similar to gmail_read_message); update should support attachment metadata (but file upload complexity may warrant a separate feature)
  • Error handling: Clear errors if updating a draft that was already sent or deleted
  • Concurrency: If the same draft is modified in Gmail UI and via API simultaneously, follow Gmail's last-write-wins behavior

Related Features

This pairs naturally with the label-writing feature request (#36547) to enable full email triage and composition workflows:

  • Labels: Mark emails for organizational triage
  • Draft reading/modification: Iteratively compose and refine draft responses
  • Together: Claude can analyze incoming email, draft a thoughtful response, refine it iteratively, then label the original for follow-up

This is essential infrastructure for agentic email workflows where Claude assists in the full lifecycle of email composition, not just creation.

extent analysis

TL;DR

To address the limitation in the native Gmail MCP connector, implement gmail_read_draft and gmail_update_draft functions to enable Claude to read and modify existing drafts, enhancing the email composition workflow.

Guidance

  1. Implement gmail_read_draft: This function should take a draftId as input and return the full draft details, including to, cc, bcc, subject, body, contentType, attachments, and threadId if it's a reply.
  2. Implement gmail_update_draft: This function should take a draftId and optional parameters for new email body, subject, to, cc, bcc, and contentType, and return the updated draft details with confirmation.
  3. Handle concurrency and errors: Implement logic to handle cases where the draft is modified in the Gmail UI and via API simultaneously, following Gmail's last-write-wins behavior, and provide clear errors if updating a draft that was already sent or deleted.
  4. Consider attachment handling: Decide how to handle attachments during read and update operations, potentially listing attachments during read and supporting attachment metadata updates.

Example

def gmail_read_draft(draft_id):
    # Use Gmail API to retrieve draft content
    draft_content = gmail_api.get_draft(draft_id)
    return draft_content

def gmail_update_draft(draft_id, body=None, subject=None, to=None, cc=None, bcc=None, content_type=None):
    # Use Gmail API to update draft content
    updated_draft = gmail_api.update_draft(draft_id, body, subject, to, cc, bcc, content_type)
    return updated_draft

Notes

  • The implementation should adhere to Gmail API standards and handle potential errors and concurrency issues.
  • Attachment handling may require additional consideration and potentially a separate feature for file upload complexity.

Recommendation

Apply workaround by implementing the proposed gmail_read_draft and gmail_update_draft functions to enhance the email composition workflow, as this is essential infrastructure for agentic email workflows.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING