Skip to main content
Glama

write_daily_note_section

Add or update content in specific sections of daily notes for tracking summaries, insights, and reflections with optional date selection and append/replace functionality.

Instructions

Write or append content to a specific section in the daily note.

Use this to add summaries, insights, reflections, or any other content to specific sections of your daily note.

Args: section: Name of the section to write to (e.g., "Notes", "Coach AI Insights") content: Content to write date_str: Optional date in YYYY-MM-DD format (defaults to today) append: If True, append to existing content. If False, replace it.

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionYes
contentYes
date_strNo
appendNo

Implementation Reference

  • The implementation of the write_daily_note_section tool, which uses an Obsidian vault instance to write or append content to a specific section in a daily note.
    async def write_daily_note_section(
        section: str, content: str, date_str: str = None, append: bool = True
    ) -> str:
        """Write or append content to a specific section in the daily note.
    
        Args:
            section: Name of the section to write to
            content: Content to write
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
            append: If True, append to existing content. If False, replace it.
    
        Returns:
            Confirmation message
        """
        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()
    
        success = vault.write_to_section(date, section, content, append=append)
    
        if not success:
            return f"❌ Failed to write to section '{section}'. Section may not exist."
    
        action = "Appended to" if append else "Updated"
        return f"✅ {action} section '{section}' in daily note for {date.strftime('%Y-%m-%d')}."
  • The tool registration for 'write_daily_note_section' in the Coach AI MCP server, which acts as a wrapper around the daily_notes.write_daily_note_section function.
    async def write_daily_note_section(
        section: str, content: str, date_str: str = None, append: bool = True
    ) -> str:
        """Write or append content to a specific section in the daily note.
    
        Use this to add summaries, insights, reflections, or any other content
        to specific sections of your daily note.
    
        Args:
            section: Name of the section to write to (e.g., "Notes", "Coach AI Insights")
            content: Content to write
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
            append: If True, append to existing content. If False, replace it.
    
        Returns:
            Confirmation message
        """
        return await daily_notes.write_daily_note_section(section, content, date_str, append)

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