get_daily_summary
Generate summary statistics for journal entries to track patterns, trends, and insights from daily content. Integrates with Claude Desktop for efficient journal management and analysis.
Instructions
Get summary statistics for journal entries
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp-server.ts:230-262 (handler)Registration and inline handler for the MCP tool 'get_daily_summary'. Retrieves journal statistics via getStats() and formats a textual summary response.this.server.tool( 'get_daily_summary', 'Get summary statistics for journal entries', async () => { const stats = await getStats(); let response = `📊 Journal Summary\n\n`; response += `**Total Entries:** ${stats.totalEntries}\n`; response += `**Total Days:** ${stats.totalFiles}\n`; if (stats.dateRange.earliest && stats.dateRange.latest) { response += `**Date Range:** ${stats.dateRange.earliest} to ${stats.dateRange.latest}\n`; } response += `\n**Top Tags:**\n`; if (stats.topTags.length === 0) { response += 'No tags found.\n'; } else { for (const { tag, count } of stats.topTags) { response += `• ${tag} (${count})\n`; } } return { content: [ { type: 'text', text: response, }, ], } satisfies CallToolResult; } );
- src/journal/manager.ts:411-437 (helper)Helper function that computes comprehensive journal statistics (total entries, files, date range, top tags) by scanning all journal entries, used by the get_daily_summary tool.export async function getStats(): Promise<JournalStats> { const result = await searchEntries(); const files = result.entries; if (files.length === 0) { return { totalEntries: 0, totalFiles: 0, dateRange: { earliest: '', latest: '' }, topTags: [], }; } const totalEntries = files.reduce((sum, file) => sum + file.entries_count, 0); const dates = files.map((f) => f.date).sort(); const topTags = await listTags(); return { totalEntries, totalFiles: files.length, dateRange: { earliest: dates[0], latest: dates[dates.length - 1], }, topTags: topTags.slice(0, 10), }; }