Skip to main content
Glama

mark_unread

Mark email as unread to remove the seen flag and maintain message visibility in your inbox.

Instructions

Mark email as unread (remove seen flag)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoFolder containing the email (default: INBOX)INBOX
message_idNoMessage ID (sequence number)
uidNoUnique ID of the message

Implementation Reference

  • The actual implementation of mark_unread logic in the EmailFlags class which interacts with the IMAP connection.
    def mark_unread(self, folder: str, uids: int | list[int]) -> bool:
        """
        Mark emails as unread (remove \\Seen flag).
    
        Args:
            folder: Folder containing the emails
            uids: Email UID or list of UIDs
    
        Returns:
            True if successful
    
        Raises:
            EmailFlagsError: If operation fails
        """
        return self._store_flags(folder, uids, "-FLAGS", self.FLAG_SEEN)

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/AdJIa/mail-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server