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
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox | Yes | New mailbox name |
Implementation Reference
- src/imap_mcp/imap_client.py:151-155 (handler)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 - src/imap_mcp/server.py:85-92 (registration)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"], ), - src/imap_mcp/server.py:496-497 (handler)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"])