read_email
Retrieve complete email content including body text and attachment lists by specifying the email ID. This tool accesses messages from email servers for viewing and analysis.
Instructions
특정 이메일의 전체 내용을 읽습니다. 본문과 첨부파일 목록을 포함합니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 이메일 ID (list_emails에서 반환된 id) |
Implementation Reference
- src/email-tools.ts:109-129 (handler)Implementation of the 'read_email' tool handler. It uses the POP3 client to fetch email details by ID and formats the output.
case "read_email": { const id = args.id as number; const email = await withConnection(config, (client) => client.getEmail(id)); let text = `**${email.subject}**\n` + `From: ${email.from}\n` + `To: ${email.to}\n` + (email.cc ? `CC: ${email.cc}\n` : "") + `Date: ${email.date ? new Date(email.date).toLocaleString("ko-KR") : ""}\n\n` + `---\n\n${email.body || "(본문 없음)"}`; if (email.attachments.length > 0) { text += `\n\n---\n**첨부파일 (${email.attachments.length}개):**\n` + email.attachments .map((a) => `- ${a.filename} (${(a.size / 1024).toFixed(1)}KB)`) .join("\n"); } return { content: [{ type: "text" as const, text }] }; } - src/email-tools.ts:32-41 (schema)Tool definition and input schema for 'read_email'.
name: "read_email", description: "특정 이메일의 전체 내용을 읽습니다. 본문과 첨부파일 목록을 포함합니다.", inputSchema: { type: "object" as const, properties: { id: { type: "number", description: "이메일 ID (list_emails에서 반환된 id)" }, }, required: ["id"], }, },