Skip to main content
Glama
Soundhannes

IMAP MCP Server

by Soundhannes

mark_unread

Mark specific emails as unread to highlight them for later review or follow-up in your IMAP email account.

Instructions

Mark emails as unread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidsYesEmail UIDs
mailboxNoMailbox name (default: current)

Implementation Reference

  • The actual implementation of the mark_unread logic, which removes the \Seen flag from the given UIDs.
    def mark_unread(self, uids: list[int], mailbox: Optional[str] = None) -> bool:
        """Mark emails as unread."""
        self._ensure_connected()
        if mailbox:
            self.select_mailbox(mailbox)
        self.client.remove_flags(uids, [b"\\Seen"])
        return True
  • Tool definition/registration for "mark_unread" in the MCP server.
    make_tool(
        "mark_unread",
        "Mark emails as unread",
        {
            "uids": {
                "type": "array",
                "items": {"type": "number"},
                "description": "Email UIDs",
            },
            "mailbox": {"type": "string", "description": "Mailbox name (default: current)"},
        },

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/Soundhannes/IMAP-MCP'

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