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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior3/5

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

No annotations provided, so description carries full burden. Explains what content is analyzed (tasks, accomplishments, notes) and output format (insights, recommendations), but omits behavioral traits like whether this is read-only, idempotent, expensive/computationally heavy, or has side effects.

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?

Well-structured with clear Args/Returns sections. Front-loaded purpose statement. Slightly verbose second sentence ('Analyzes the day's tasks...') which repeats information implied by 'summary', but overall efficient with no wasted words.

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

Completeness4/5

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

Appropriate for complexity: 1 optional parameter, output schema exists (so return value documentation in description is supplementary rather than required). Could improve by noting whether tool requires existing daily note or creates silently, but covers core functionality.

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

Parameters4/5

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

Schema has 0% description coverage (only type/default). Description compensates effectively by specifying date format (YYYY-MM-DD) and default behavior ('defaults to today'), which schema only shows as null. Adds essential semantic meaning beyond raw schema fields.

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

Purpose5/5

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

Clear specific verb 'Generate' + resource 'end-of-day summary'. Distinguishes from siblings like read_daily_note_full (raw reading) by emphasizing analysis/insights, and from write_daily_note_section by being a generation tool rather than direct writing.

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?

Provides implied usage context ('can be added back to the daily note or used to plan tomorrow'), but lacks explicit when-to-use guidance versus alternatives like read_daily_note_full or start_my_day. No mention of prerequisites (e.g., whether daily note must exist).

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

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