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;
      }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by describing important behavioral traits: the tool's purpose (synthesis), quality criteria ('only include notes that actually add long-term value'), fallback behavior ('call /evaluateInsight tool'), and error handling ('stop and ask the user for more information'). It also provides a philosophical guideline ('better to not log anything than log something that is not useful').

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

Conciseness3/5

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

The description is appropriately sized (4 sentences) but could be better structured. The first sentence clearly states the purpose, but the remaining sentences mix usage guidelines, quality criteria, and behavioral instructions without clear separation. Some sentences like 'It is better to not log anything than log something that is not useful' could be more concise.

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?

For a tool with 4 parameters, no annotations, and no output schema, the description provides good behavioral context but insufficient parameter guidance. It covers the 'why' and 'how' of using the tool but doesn't adequately explain what the input arrays should contain beyond what's in the schema. The description would benefit from more detail about expected output format since there's no output schema.

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?

The description mentions only one parameter ('Optionally specify a date (YYYY-MM-DD)') while the schema has 4 parameters with 75% description coverage. The description doesn't explain the semantics of 'accomplishments', 'insights', or 'todos' arrays that are documented in the schema. With schema coverage at 75%, the baseline is 3, and the description adds minimal value beyond what's already in the schema.

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.' This specifies the verb (synthesize), resource (daily note), and output format (organized rollup). However, it doesn't explicitly differentiate this tool from sibling tools like 'log' or 'write_note' that might also handle notes.

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 context for when to use this tool: for synthesizing daily notes into organized rollups. It explicitly mentions an alternative tool ('/evaluateInsight') for evaluating long-term value of thoughts. However, it doesn't specify when NOT to use this tool versus other note-related siblings like '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.

Install Server

Other 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