list_mails
Retrieve recent emails from your Naver Mail account in JSON or text format, specifying the number of messages to fetch for mail management.
Instructions
최근 N개 메일 목록 조회 (JSON 또는 텍스트 형태)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_count | No | 가져올 메일 개수 | |
| format | No | 출력 형태 (json: JSON 형태, text: 읽기 쉬운 텍스트(내용은 없음)) | text |
Implementation Reference
- server.py:306-317 (handler)The handler logic for "list_mails" tool inside 'handle_call_tool' in 'server.py'. It uses 'MailService.get_mails' to fetch data and then formats it as JSON or text.
if name == "list_mails": max_count = args.get("max_count", 10) output_format = args.get("format", "text") mails = mail_service.get_mails(max_count=max_count) if output_format == "json": content = mails_to_json(mails) else: content = mails_to_text(mails) return [TextContent(type="text", text=content)] - server.py:30-53 (registration)The registration of "list_mails" tool within the '@server.list_tools()' decorated function in 'server.py'.
@server.list_tools() async def handle_list_tools() -> list[Tool]: return [ Tool( name="list_mails", description="최근 N개 메일 목록 조회 (JSON 또는 텍스트 형태)", inputSchema={ "type": "object", "properties": { "max_count": { "type": "number", "default": 10, "description": "가져올 메일 개수" }, "format": { "type": "string", "enum": ["json", "text"], "default": "text", "description": "출력 형태 (json: JSON 형태, text: 읽기 쉬운 텍스트(내용은 없음))" } }, "required": [], } ),