add_auto_archive_sender
Automatically archive emails from specific senders or domains by adding them to an auto-archive list. This tool helps organize your inbox by filtering out emails you want archived automatically.
Instructions
Add sender to auto-archive list
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Email address or domain to auto-archive | ||
| comment | No | Optional comment/reason |
Implementation Reference
- src/imap_mcp/imap_client.py:890-901 (handler)The logic that adds an email sender to the auto-archive configuration list and saves the config to disk.
def add_auto_archive_sender( self, email_addr: str, comment: Optional[str] = None ) -> bool: """Add sender to auto-archive list.""" sender = AutoArchiveSender( email=email_addr, comment=comment, added_at=datetime.now(), ) self.auto_archive_senders.append(sender) self._save_auto_archive_config() return True - src/imap_mcp/server.py:669-673 (registration)The MCP server handler that dispatches calls to the 'add_auto_archive_sender' tool to the appropriate method in the IMAP client instance.
elif name == "add_auto_archive_sender": return imap_client.add_auto_archive_sender( email_addr=args["email"], comment=args.get("comment"), )