get_mail_detail
Retrieve detailed information about a specific email from your Naver Mail account, including content and metadata, by providing the email's unique identifier.
Instructions
특정 메일의 상세 정보 조회
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | 조회할 메일의 UID | |
| format | No | 출력 형태 (json: JSON 형태, text: 읽기 쉬운 텍스트(내용은 없음)) | json |
Implementation Reference
- server.py:342-363 (handler)The handler for 'get_mail_detail' tool, which fetches a specific email by UID from the IMAP server and formats the response.
elif name == "get_mail_detail": uid = args.get("uid") output_format = args.get("format", "json") if not uid: return [TextContent(type="text", text="UID가 필요합니다.")] # 특정 UID의 메일 가져오기 with MailBox("imap.naver.com").login(NAVER_ID, NAVER_PASSWORD, "INBOX") as mailbox: mails = list(mailbox.fetch(criteria=AND(uid=uid))) if not mails: return [TextContent(type="text", text=f"UID {uid}에 해당하는 메일을 찾을 수 없습니다.")] mail = mails[0] if output_format == "json": content = mail_to_json(mail) else: content = mail_to_text(mail, detailed=True) return [TextContent(type="text", text=content)] - server.py:80-98 (schema)The registration and schema definition for the 'get_mail_detail' tool.
name="get_mail_detail", description="특정 메일의 상세 정보 조회", inputSchema={ "type": "object", "properties": { "uid": { "type": "string", "description": "조회할 메일의 UID" }, "format": { "type": "string", "enum": ["json", "text"], "default": "json", "description": "출력 형태 (json: JSON 형태, text: 읽기 쉬운 텍스트(내용은 없음))" } }, "required": ["uid"], } ),