You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cherry-picked from upstream PR ai-zerolab#109. Adds move_emails,
list_mailboxes, and create_mailbox tools for folder management.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mcp.tool(description="List all available mailboxes/folders for an email account.")
225
+
asyncdeflist_mailboxes(
226
+
account_name: Annotated[str, Field(description="The name of the email account.")],
227
+
) ->list[str]:
228
+
handler=dispatch_handler(account_name)
229
+
returnawaithandler.list_mailboxes()
230
+
231
+
232
+
@mcp.tool(
233
+
description="Move one or more emails to another mailbox/folder. Use list_emails_metadata first to get email_ids and list_mailboxes to see available folders."
234
+
)
235
+
asyncdefmove_emails(
236
+
account_name: Annotated[str, Field(description="The name of the email account.")],
237
+
email_ids: Annotated[
238
+
list[str],
239
+
Field(description="List of email_id to move (obtained from list_emails_metadata)."),
240
+
],
241
+
target_mailbox: Annotated[str, Field(description="The target mailbox/folder to move emails to.")],
242
+
source_mailbox: Annotated[
243
+
str, Field(default="INBOX", description="The source mailbox to move emails from.")
0 commit comments