Skip to main content
Glama

rollup

Organize daily notes into structured summaries, categorizing accomplishments, insights, and actionable todos for long-term value. Optionally specify a date to filter entries.

Instructions

Synthesize my daily note to create an organized rollup of the most important notes with clear categories, connections, and action items. Optionally specify a date (YYYY-MM-DD). Only include notes that actually add long-term value. If you are unsure, call the /evaluateInsight tool to evaluate the long-term value of the thought. If you do not have enough information, stop and ask the user for more information. It is better to not log anything than log something that is not useful.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accomplishmentsYesA list of accomplishments. Each accomplishment should be a short description of the work done in the day so that it can answer the question 'what did you do all day?'
dateNo
insightsYesA list of insights. Each insight should be a long-term storage. Things like new knowledge gained. Do not force insights - only add ones that naturally emerge from the content and would help build meaningful connections between notes.
todosNoA list of todos. Each todo should be a short description of the task to be done. A todo should be actionable.

Implementation Reference

  • The main handler logic for the 'rollup' tool within the handleToolCall function's switch statement. It ensures the Rollups directory exists, formats the provided arguments, loads and processes a rollup template, and writes the resulting file.
    case "rollup": { try { console.error("Doing Rollup:", args); const rollupArgs = args as RollupArgs; // Ensure Rollups directory exists const rollupsDir = path.join(notesPath, 'Rollups'); const success = await ensureDirectory(rollupsDir); if (!success) { return { content: [{ type: "text", text: `Error preparing rollup: Failed to create Rollups directory` }], isError: true }; } // Get date info - use provided date or today const targetDate = rollupArgs.date ? new Date(rollupArgs.date) : new Date(); const dateInfo = formatDate(targetDate); // Try to read the daily log for this date const logPath = path.join(notesPath, 'Log', `${dateInfo.isoDate}.md`); let logContent = ""; // Create rollup template with content inputs const rollupPath = path.join(rollupsDir, `${dateInfo.isoDate}-rollup.md`); // Format achievements if provided let achievements = ""; if (rollupArgs.accomplishments) { achievements = rollupArgs.accomplishments.map(item => `- ${item}`).join('\n'); } // Format insights if provided let insights = ""; if (rollupArgs.insights) { insights = rollupArgs.insights.map(item => `- ${item}`).join('\n'); } // Format todos if provided let todos = ""; if (rollupArgs.todos) { todos = rollupArgs.todos.map(item => `- ${item}`).join('\n'); } // Load the template and process it let rollupTemplate; try { rollupTemplate = await loadAndProcessTemplate('rollup.md', { fullDate: dateInfo.fullDate, achievements, insights, todos }); } catch (error) { console.error("Error loading rollup template:", error); // Fallback template rollupTemplate = `# Daily Rollup: ${dateInfo.fullDate}\n\n## 🏆 Achievements\n${achievements}\n\n## 💡 Insights\n${insights}\n\n## Daily Log Summary\n\n${logContent}\n\n## Key Takeaways\n\n## Action Items\n`; } // Write the rollup file await fs.writeFile(rollupPath, rollupTemplate, 'utf8'); return { content: [{ type: "text", text: `Rollup saved to ${rollupPath}` }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); console.error("Error in rollup command:", error); return { content: [{ type: "text", text: `Error creating rollup: ${errorMessage}` }], isError: true, }; } }
  • The tool definition object for 'rollup' registered in the getToolDefinitions() function, including the name, description, and input schema.
    { name: "rollup", description: ` Synthesize my daily note to create an organized rollup of the most important notes with clear categories, connections, and action items. Optionally specify a date (YYYY-MM-DD). Only include notes that actually add long-term value. If you are unsure, call the /evaluateInsight tool to evaluate the long-term value of the thought. If you do not have enough information, stop and ask the user for more information. It is better to not log anything than log something that is not useful. `, inputSchema: { type: "object", properties: { date: { type: "string" }, accomplishments: { type: "array", items: { type: "string" }, description: "A list of accomplishments. Each accomplishment should be a short description of the work done in the day so that it can answer the question 'what did you do all day?'", }, insights: { type: "array", items: { type: "string" }, description: "A list of insights. Each insight should be a long-term storage. Things like new knowledge gained. Do not force insights - only add ones that naturally emerge from the content and would help build meaningful connections between notes.", }, todos: { type: "array", items: { type: "string" }, description: "A list of todos. Each todo should be a short description of the task to be done. A todo should be actionable.", }, }, required: ["accomplishments", "insights"] }, },
  • TypeScript interface defining the expected input parameters for the rollup tool handler.
    interface RollupArgs { date?: string; accomplishments?: string[]; insights?: string[]; todos?: string[]; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikeysrecipes/mcp-notes'

If you have feedback or need assistance with the MCP directory API, please join our Discord server