Skip to content

feat: Add get_top_senders analytics tool #7

@patrickfreyer

Description

@patrickfreyer

Summary

Add a tool to show who sends the user the most email.

Motivation

Helps identify:

  • Key contacts to prioritize
  • High-volume senders to filter/unsubscribe
  • Email patterns for better organization

Proposed API

@mcp.tool()
def get_top_senders(
    account: str,
    days_back: int = 30,
    mailbox: str = "INBOX",
    limit: int = 10,
    group_by_domain: bool = False
) -> str:
    """Get top email senders by volume.
    
    Returns:
        Ranked list of senders with email counts
        Optionally grouped by domain (e.g., all @company.com)
    """

Use Cases

  • "Who emails me most?"
  • "Which domains should I create filters for?"
  • "Am I getting too many emails from one source?"

Priority

LOW - Nice analytics but not core functionality

Labels

enhancement, priority-low, analytics

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