Skip to main content
Glama
Leonamin

Naver Mail MCP Server

by Leonamin

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
NameRequiredDescriptionDefault
uidYes조회할 메일의 UID
formatNo출력 형태 (json: JSON 형태, text: 읽기 쉬운 텍스트(내용은 없음))json

Implementation Reference

  • 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)]
  • 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"],
        }
    ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Leonamin/NaverMail-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server