Skip to main content
Glama

generate_daily_summary

Analyze daily tasks, accomplishments, and notes to generate insights and recommendations for planning tomorrow's activities.

Instructions

Generate an end-of-day summary based on the daily note.

Analyzes the day's tasks, accomplishments, notes, and provides insights. This summary can be added back to the daily note or used to plan tomorrow.

Args: date_str: Optional date in YYYY-MM-DD format (defaults to today)

Returns: Generated summary with insights and recommendations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
date_strNo

Implementation Reference

  • The implementation of `generate_daily_summary` which reads the daily note from Obsidian and formats an end-of-day report.
    async def generate_daily_summary(date_str: str = None) -> str:
        """Generate an end-of-day summary based on the daily note.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
    
        Returns:
            Generated summary with insights and recommendations
        """
        vault = get_vault()
        if not vault:
            return "❌ Obsidian vault not configured."
    
        if date_str:
            try:
                date = datetime.strptime(date_str, "%Y-%m-%d")
            except ValueError:
                return f"❌ Invalid date format: {date_str}"
        else:
            date = datetime.now()
    
        # Read full note
        note_data = vault.read_full_note(date)
    
        if not note_data:
            return f"❌ No daily note found for {date.strftime('%Y-%m-%d')}."
    
        # Extract key information
        tasks_section = note_data["sections"].get(
            "Tasks", note_data["sections"].get("✅ Tasks", "")
        )
        accomplishments_section = note_data["sections"].get(
            "Accomplishments", note_data["sections"].get("💪 Accomplishments", "")
        )
        notes_section = note_data["sections"].get(
            "Notes", note_data["sections"].get("📝 Notes", "")
        )
    
        # Parse tasks
        completed_tasks = []
        incomplete_tasks = []
    
        for line in tasks_section.split("\n"):
            if "- [x]" in line:
                completed_tasks.append(line.replace("- [x]", "").strip())
            elif "- [ ]" in line:
                incomplete_tasks.append(line.replace("- [ ]", "").strip())
    
        # Build summary
        summary = f"# Summary for {date.strftime('%A, %B %d, %Y')}\n\n"
    
        # Completion stats
        total_tasks = len(completed_tasks) + len(incomplete_tasks)
        if total_tasks > 0:
            completion_rate = (len(completed_tasks) / total_tasks) * 100
            summary += f"## 📊 Completion Rate: {completion_rate:.0f}%\n"
            summary += f"- Completed: {len(completed_tasks)}/{total_tasks} tasks\n\n"
        else:
            summary += "## 📊 No tasks tracked today\n\n"
    
        # Accomplishments
        if completed_tasks or accomplishments_section.strip():
            summary += "## ✅ What Went Well\n"
            if completed_tasks:
                for task in completed_tasks[:5]:
                    if task and not task.startswith("#"):
                        summary += f"- {task}\n"
            if accomplishments_section.strip():
                summary += f"\n{accomplishments_section}\n"
            summary += "\n"
    
        # Incomplete tasks
        if incomplete_tasks:
            summary += "## ⏸️ Carried Over\n"
            summary += f"{len(incomplete_tasks)} tasks to consider for tomorrow:\n"
            for task in incomplete_tasks[:3]:
                if task and not task.startswith("#"):
                    summary += f"- {task}\n"
            summary += "\n"
    
        # Key insights from notes
        if notes_section.strip():
            summary += "## 💭 Key Notes\n"
            # Take first few lines of notes as highlights
            note_lines = [
                line.strip()
                for line in notes_section.split("\n")
                if line.strip() and not line.strip().startswith("<!--")
            ]
            for line in note_lines[:3]:
                summary += f"- {line}\n"
            summary += "\n"
    
        # Recommendations
        summary += "## 🎯 Recommendations\n"
        if len(incomplete_tasks) > 5:
            summary += "- Consider breaking down or delegating some tasks - you have quite a few incomplete items\n"
        if len(completed_tasks) > 3:
            summary += "- Great productivity today! Maintain this momentum\n"
        if not completed_tasks and not incomplete_tasks:
            summary += "- Start tracking your tasks in the daily note for better visibility\n"
    
        summary += f"\n_Generated at {datetime.now().strftime('%I:%M%p').lower()}_"
    
        return summary
  • Tool registration for `generate_daily_summary` in the MCP server.
    async def generate_daily_summary(date_str: str = None) -> str:
        """Generate an end-of-day summary based on the daily note.
    
        Analyzes the day's tasks, accomplishments, notes, and provides insights.
        This summary can be added back to the daily note or used to plan tomorrow.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
    
        Returns:
            Generated summary with insights and recommendations
        """
        return await daily_notes.generate_daily_summary(date_str)

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/94aharris/coach-ai'

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