Skip to main content
Glama

generate_daily_summary

Generate daily productivity summaries by analyzing Slack, Calendar, and Gmail activity for end-of-day wrap-ups and next-day planning.

Instructions

Generate a concise daily productivity summary from today's Slack, Calendar, and Gmail activity. Perfect for end-of-day wrap-ups and next-day planning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate to summarize in YYYY-MM-DD format (default: today)
output_formatNoOutput format(s) to generate (default: both)both
save_to_fileNoWhether to save output to summaries directory (default: true)
include_sectionsNoSections to include (default: all)

Implementation Reference

  • Main execution logic for the generate_daily_summary tool, handling arguments, generating instructions and template, processing collected data, and saving outputs.
    export async function generateDailySummary(args) {
      const startTime = Date.now();
      
      try {
        // Get the date (default to today)
        const targetDate = args.date || new Date().toISOString().split('T')[0];
        const startDate = targetDate;
        const endDate = targetDate;
        
        const outputFormat = args.output_format || config.defaults.outputFormat;
        const saveToFile = args.save_to_file !== false;
        const includeSections = args.include_sections || ['meetings', 'communications', 'accomplishments', 'tomorrow'];
        
        // Generate data collection instructions for the AI
        const instructions = generateDailyDataCollectionInstructions(targetDate);
        
        // Generate summary template
        const summaryTemplate = generateDailySummaryTemplate(targetDate, includeSections);
        
        // Prepare response structure
        const result = {
          success: true,
          message: 'Daily summary generation initiated. Please follow the data collection instructions below.',
          date: targetDate,
          instructions,
          template: summaryTemplate,
          output_format: outputFormat,
          save_to_file: saveToFile,
          note: 'This tool provides instructions for the AI agent to collect today\'s data and generate a concise daily summary.',
        };
        
        // If the AI has already collected data (passed in args), process it
        if (args.collected_data) {
          result.summary = await processDailySummaryData(args.collected_data, targetDate, includeSections);
          
          // Save to file if requested
          if (saveToFile) {
            const files = [];
            
            if (outputFormat === 'both' || outputFormat === 'html') {
              const htmlFilename = `daily-summary-${targetDate}.html`;
              const htmlPath = await saveSummary(result.summary.html, htmlFilename);
              files.push(htmlPath);
            }
            
            if (outputFormat === 'both' || outputFormat === 'markdown') {
              const mdFilename = `daily-summary-${targetDate}.md`;
              const mdPath = await saveSummary(result.summary.markdown, mdFilename);
              files.push(mdPath);
            }
            
            result.files_saved = files;
          }
        }
        
        result.generation_time_ms = Date.now() - startTime;
        
        return result;
        
      } catch (error) {
        throw {
          code: error.code || 'GENERATION_FAILED',
          message: error.message || 'Failed to generate daily summary',
          details: error.details || error.stack,
        };
      }
    }
  • Input schema and description for the generate_daily_summary tool, defining parameters like date, output_format, etc.
    {
      name: 'generate_daily_summary',
      description: 'Generate a concise daily productivity summary from today\'s Slack, Calendar, and Gmail activity. Perfect for end-of-day wrap-ups and next-day planning.',
      inputSchema: {
        type: 'object',
        properties: {
          date: {
            type: 'string',
            description: 'Date to summarize in YYYY-MM-DD format (default: today)',
            pattern: '^\\d{4}-\\d{2}-\\d{2}$',
          },
          output_format: {
            type: 'string',
            enum: ['both', 'html', 'markdown', 'json'],
            description: 'Output format(s) to generate (default: both)',
            default: 'both',
          },
          save_to_file: {
            type: 'boolean',
            description: 'Whether to save output to summaries directory (default: true)',
            default: true,
          },
          include_sections: {
            type: 'array',
            items: {
              type: 'string',
              enum: ['meetings', 'communications', 'accomplishments', 'tomorrow'],
            },
            description: 'Sections to include (default: all)',
          },
        },
      },
    },
  • Registration of the generate_daily_summary tool in the central tool dispatcher switch statement.
    case 'generate_daily_summary':
      result = await generateDailySummary(args);
      break;
  • Helper function to generate the structure/template for the daily summary sections.
    function generateDailySummaryTemplate(date, sections) {
      const template = {
        date: date,
        display: formatDisplayDate(date),
        sections: {},
      };
      
      if (sections.includes('meetings')) {
        template.sections.meetings = {
          total: 0,
          hours: 0,
          key_meetings: [],
          outcomes: [],
        };
      }
      
      if (sections.includes('communications')) {
        template.sections.communications = {
          slack_messages: 0,
          important_threads: [],
          emails: 0,
          key_contacts: [],
        };
      }
      
      if (sections.includes('accomplishments')) {
        template.sections.accomplishments = [
          'Key accomplishments and completed tasks',
        ];
      }
      
      if (sections.includes('tomorrow')) {
        template.sections.tomorrow = {
          upcoming_meetings: [],
          action_items: [],
          prep_needed: [],
        };
      }
      
      return template;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions generating a summary and saving it (implied by 'save_to_file' parameter), but doesn't cover critical aspects like authentication requirements, rate limits, data privacy implications, or what happens when saving fails. For a tool that aggregates personal data from multiple sources, this is a significant gap in transparency.

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 concise with two sentences that directly address purpose and usage. It's front-loaded with the core functionality and avoids unnecessary fluff. However, the second sentence could be slightly more specific (e.g., 'Use for end-of-day wrap-ups' instead of 'Perfect for'), keeping it efficient but not perfectly polished.

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 the tool's complexity (aggregating data from multiple sources, 4 parameters, no output schema, and no annotations), the description is moderately complete. It covers the 'what' and hints at the 'why,' but lacks details on behavioral aspects, error handling, or output structure. Without annotations or an output schema, users might not fully understand what to expect from the tool's operation.

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 100%, meaning all parameters are documented in the schema itself. The description doesn't add any parameter-specific details beyond what's in the schema (e.g., it doesn't explain the 'include_sections' options further). With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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: 'Generate a concise daily productivity summary from today's Slack, Calendar, and Gmail activity.' It specifies the verb (generate), resource (daily productivity summary), and data sources (Slack, Calendar, Gmail). However, it doesn't explicitly differentiate from sibling tools like 'generate_weekly_summary' or 'get_summary', which prevents a perfect score.

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

Usage Guidelines3/5

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

The description provides implied usage context with 'Perfect for end-of-day wrap-ups and next-day planning,' suggesting when to use it. However, it lacks explicit guidance on when to choose this tool over alternatives like 'generate_weekly_summary' or 'get_quick_stats,' and doesn't mention any prerequisites or exclusions, leaving room for ambiguity.

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/philipbloch/summary-mcp'

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