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
result=f"Successfully marked {len(success_ids)} email(s) as {status}"
243
+
iffailed_ids:
244
+
result+=f", failed to mark {len(failed_ids)} email(s): {', '.join(failed_ids)}"
245
+
returnresult
246
+
247
+
248
+
@mcp.tool(
249
+
description="Move one or more emails to a different mailbox/folder. Common destinations: 'Archive', 'Trash', 'Spam'. Use list_emails_metadata first to get the email_id."
250
+
)
251
+
asyncdefmove_emails(
252
+
account_name: Annotated[str, Field(description="The name of the email account.")],
253
+
email_ids: Annotated[
254
+
list[str],
255
+
Field(description="List of email_id to move (obtained from list_emails_metadata)."),
256
+
],
257
+
destination_mailbox: Annotated[
258
+
str,
259
+
Field(description="Target mailbox name (e.g., 'Archive', 'Trash', 'Spam', '[Gmail]/All Mail')."),
result=f"Successfully moved {len(moved_ids)} email(s) to '{destination_mailbox}'"
267
+
iffailed_ids:
268
+
result+=f", failed to move {len(failed_ids)} email(s): {', '.join(failed_ids)}"
269
+
returnresult
270
+
271
+
199
272
@mcp.tool(
200
273
description="Download an email attachment and save it to the specified path. This feature must be explicitly enabled in settings (enable_attachment_download=true) due to security considerations.",
0 commit comments