list_folders
Retrieve all folder names from your Naver Mail account to organize and access emails efficiently within MCP-compatible clients.
Instructions
메일 폴더 목록 조회
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:377-383 (handler)MCP tool handler logic for 'list_folders', which calls the mail service and formats the output.
elif name == "list_folders": folder_info_list = mail_service.get_folder_list() folder_list = folder_info_list_to_folder_list(folder_info_list) import json content = json.dumps( [folder.to_dict() for folder in folder_list], ensure_ascii=False, indent=2) return [TextContent(type="text", text=content)] - server.py:100-108 (registration)Registration of the 'list_folders' tool in the MCP server setup.
Tool( name="list_folders", description="메일 폴더 목록 조회", inputSchema={ "type": "object", "properties": {}, "required": [], } ), - service/mail_service.py:147-152 (helper)Helper method in the MailService class that retrieves the folder list from the mailbox.
def get_folder_list(self) -> List[FolderInfo]: """ IMAP 형식에 맞는 폴더를 가져옵니다. """ with self._get_mailbox_client() as mailbox: return mailbox.folder.list()