Skip to content

feat: Add mark_emails tool for batch read/unread/flag operations #2

@patrickfreyer

Description

@patrickfreyer

Summary

Add a tool to batch mark emails as read, unread, flagged, or unflagged based on criteria.

Motivation

Currently there's no way to mark emails as read after viewing them. This is the most basic email action and completes the "find → view → act" loop.

Proposed API

@mcp.tool()
def mark_emails(
    account: str,
    action: Literal["read", "unread", "flagged", "unflagged"],
    subject_keyword: Optional[str] = None,
    sender: Optional[str] = None,
    mailbox: str = "INBOX",
    max_emails: int = 10
) -> str:
    """Batch mark emails based on criteria."""

Use Cases

  • "Mark all newsletters as read"
  • "Flag emails from my manager"
  • "Mark all emails older than 7 days as read"

Priority

HIGH - Most requested missing action

Labels

enhancement, priority-high

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions