summarize_inbox
Summarize recent emails in your Outlook inbox to quickly review key messages without reading each one individually.
Instructions
Summarize inbox emails
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of emails to summarize |
Implementation Reference
- src/index.ts:71-84 (schema)Defines the input schema, description, and registration of the 'summarize_inbox' tool in the list of available tools.{ name: "summarize_inbox", description: "Summarize inbox emails", inputSchema: { type: "object", properties: { count: { type: "number", description: "Number of emails to summarize", default: 10 } } } },
- src/index.ts:514-530 (handler)The handler function for 'summarize_inbox' tool. It retrieves the specified number (default 10) of inbox emails using OutlookManager, calculates the number of unread emails, and returns a formatted markdown text summary including totals and details of the top 5 recent emails.case 'summarize_inbox': { const count = (args as any)?.count || 10; const emails = await outlookManager.getInboxEmails(count); const unreadCount = emails.filter(e => !e.isRead).length; return { content: [ { type: 'text', text: `š **Inbox Summary**\nTotal: ${emails.length} emails\nUnread: ${unreadCount} emails\n\nš **Recent Emails:**\n` + emails.slice(0, 5).map((email, index) => `${index + 1}. ${email.isRead ? 'ā ' : 'š©'} **${email.subject}**\n From: ${email.sender}\n Time: ${email.receivedTime}\n` ).join('\n') }, ], }; }
- src/index_new.js:321-331 (handler)Alternative handler in index_new.js that delegates the summarization logic to EmailSummarizer.summarizeInbox after fetching emails.case 'summarize_inbox': { const emails = await outlookManager.getInboxEmails(args.count || 10); const summary = EmailSummarizer.summarizeInbox(emails); return { content: [ { type: 'text', text: summary, }, ], };
- src/email-summarizer.js:16-27 (helper)Likely the core summarization logic used by index_new.js (possibly called as summarizeInbox), which generates per-email summaries with priority detection, action flags, previews, and formats a multiple-email overview with stats on unread, high-priority, and action-required counts.static summarizeMultipleEmails(emails) { const summaries = emails.map(email => ({ id: email.id, subject: email.subject, sender: email.sender, receivedTime: email.receivedTime, isRead: email.isRead, priority: this.detectPriority(email.subject, email.body), actionRequired: this.detectActionRequired(email.body), bodyPreview: this.extractBodyPreview(email.body) })); return this.formatMultipleSummaries(summaries);