Skip to main content
Glama
Soundhannes

IMAP MCP Server

by Soundhannes

create_mailbox

Create a new mailbox folder in an IMAP email account to organize messages. Use this tool to add custom folders for better email management.

Instructions

Create a new mailbox folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxYesNew mailbox name

Implementation Reference

  • The actual implementation of the create_mailbox logic which uses the underlying client's create_folder method.
    def create_mailbox(self, mailbox: str) -> bool:
        """Create a new mailbox folder."""
        self._ensure_connected()
        self.client.create_folder(mailbox)
        return True
  • Registration of the 'create_mailbox' tool with its schema definition in the MCP server.
    make_tool(
        "create_mailbox",
        "Create a new mailbox folder",
        {
            "mailbox": {"type": "string", "description": "New mailbox name"},
        },
        ["mailbox"],
    ),
  • Dispatch logic in the server handling the 'create_mailbox' tool request by calling the client method.
    elif name == "create_mailbox":
        return imap_client.create_mailbox(args["mailbox"])

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