copy_mails
Copy emails from your Naver Mail account to a different folder using mail UIDs and target folder name for organized mail management.
Instructions
메일을 다른 폴더로 복사
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mail_uids | Yes | 복사할 메일들의 UID 목록 | |
| folder_name | Yes | 복사할 대상 폴더 이름 |
Implementation Reference
- service/mail_service.py:101-106 (handler)The implementation of the copy_mails tool logic that interacts with the mailbox client.
def copy_mails(self, mail_uids: List[str], folder_name: str) -> None: """ 메일을 폴더로 복사합니다. """ with self._get_mailbox_client() as mailbox: mailbox.copy(mail_uids, folder_name) - server.py:175-194 (registration)The MCP tool registration for 'copy_mails' including its input schema.
Tool( name="copy_mails", description="메일을 다른 폴더로 복사", inputSchema={ "type": "object", "properties": { "mail_uids": { "type": "array", "items": {"type": "string"}, "description": "복사할 메일들의 UID 목록" }, "folder_name": { "type": "string", "description": "복사할 대상 폴더 이름" } }, "required": ["mail_uids", "folder_name"], } ), Tool( - server.py:434-446 (handler)The request handler logic that processes the 'copy_mails' tool call in server.py.
elif name == "copy_mails": mail_uids = args.get("mail_uids", []) folder_name = args.get("folder_name") if not mail_uids or not folder_name: return [TextContent(type="text", text="메일 UID 목록과 폴더 이름이 필요합니다.")] # 폴더 존재 여부 확인 if not mail_service.is_folder_exists(folder_name): return [TextContent(type="text", text=f"폴더 '{folder_name}'가 존재하지 않습니다.")] mail_service.copy_mails(mail_uids, folder_name) return [TextContent(type="text", text=f"{len(mail_uids)}개의 메일이 '{folder_name}' 폴더로 성공적으로 복사되었습니다.")]