Skip to main content
Glama

mark_read

Mark email messages as read in your inbox or specified folders to manage unread email counts and organize your mailbox effectively.

Instructions

Mark email as read (seen)

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 core implementation of the mark_read functionality, which adds the \\Seen flag to email UIDs.
    def mark_read(self, folder: str, uids: int | list[int]) -> bool:
        """
        Mark emails as read (seen).
    
        Args:
            folder: Folder containing the emails
            uids: Email UID or list of UIDs
    
        Returns:
            True if successful
    
        Raises:
            EmailFlagsError: If operation fails
    
        Example:
            >>> flags = EmailFlags(conn)
            >>> flags.mark_read('INBOX', [1, 2, 3])
            True
        """
        return self._store_flags(folder, uids, "+FLAGS", self.FLAG_SEEN)
  • Registration of the 'mark_read' MCP tool with its input schema.
    Tool(
        name="mark_read",
        description="Mark email as read (seen)",
        inputSchema={
            "type": "object",
            "properties": {
                "folder": {
                    "type": "string",
                    "description": "Folder containing the email (default: INBOX)",
                    "default": "INBOX",
                },
                "message_id": {
                    "type": "string",
                    "description": "Message ID (sequence number)",
                },
                "uid": {
                    "type": "string",
                    "description": "Unique ID of the message",

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