Skip to main content
Glama

rollup

Synthesize daily notes into organized summaries with categorized accomplishments, insights, and action items to extract long-term value from your knowledge system.

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
dateNo
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?'
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

  • Main handler logic for the 'rollup' tool in handleToolCall function. Creates Rollups directory if needed, processes date, formats inputs, loads and processes rollup.md template, writes the rollup 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,
        };
      }
    }
  • Registration of the 'rollup' tool in getToolDefinitions(): includes name, description, and inputSchema.
    {
      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 input arguments for the rollup tool.
    interface RollupArgs {
      date?: string;
      accomplishments?: string[];
      insights?: string[];
      todos?: string[];
    }
  • Helper function ensureDirectory used in rollup handler to create the Rollups directory if it doesn't exist.
    export async function ensureDirectory(dirPath: string): Promise<boolean> {
      try {
        await fs.mkdir(dirPath, { recursive: true });
        return true;
      } catch (err) {
        if (err instanceof Error && 'code' in err && err.code === 'EEXIST') {
          return true;
        }
        console.error(`Error creating directory ${dirPath}:`, err);
        return false;
      }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses behavioral traits like quality filtering ('only include notes that add long-term value'), optional actions ('call /evaluateInsight'), and error handling ('stop and ask the user'). However, it doesn't cover potential side effects, rate limits, or authentication needs, leaving gaps for a mutation-like tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with four sentences, each adding value: purpose, quality criteria, alternative tool reference, and error handling. It's front-loaded with the core purpose. However, some phrasing could be tighter, such as 'It is better to not log anything than log something that is not useful,' which is slightly redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is moderately complete. It covers purpose, usage guidelines, and some behavioral aspects but lacks details on output format, error responses, or system constraints. For a tool with 4 parameters and mutation-like behavior, more contextual information would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, with clear descriptions for 'accomplishments', 'insights', and 'todos'. The description adds minimal parameter semantics beyond the schema, only mentioning 'Optionally specify a date (YYYY-MM-DD)' for the 'date' parameter. Since schema coverage is high, the baseline is 3, and the description provides slight additional context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Synthesize my daily note to create an organized rollup of the most important notes with clear categories, connections, and action items.' It specifies the verb 'synthesize' and resource 'daily note,' with output details. However, it doesn't explicitly differentiate from siblings like 'log' or 'write_note' beyond mentioning '/evaluateInsight' as an alternative for evaluation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: 'Only include notes that actually add long-term value' and references '/evaluateInsight' for uncertain cases. It also advises to 'stop and ask the user for more information' if needed. However, it lacks explicit when-not-to-use guidance or comparisons to all sibling tools (e.g., vs. 'log' or 'write_note').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.