Skip to main content
Glama

add_daily_note_section

Add a structured section to your daily note with custom headings and content to organize thoughts, tasks, or reflections for ADHD productivity management.

Instructions

Add a new section to the daily note.

Creates a new section with a heading and initial content.

Args: section_name: Name for the new section content: Initial content for the section date_str: Optional date in YYYY-MM-DD format (defaults to today) emoji: Optional emoji to prefix the section heading (e.g., "📊", "💡")

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
section_nameYes
contentYes
date_strNo
emojiNo

Implementation Reference

  • Actual implementation of the tool logic.
    async def add_daily_note_section(
        section_name: str, content: str, date_str: str = None, emoji: str = ""
    ) -> str:
        """Add a new section to the daily note.
    
        Args:
            section_name: Name for the new section
            content: Initial content for the section
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
            emoji: Optional emoji to prefix the section heading
    
        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.add_section(date, section_name, content, emoji=emoji)
    
        if not success:
            return f"❌ Failed to add section '{section_name}'. Daily note may not exist."
    
        return f"✅ Added new section '{section_name}' to daily note for {date.strftime('%Y-%m-%d')}."
  • MCP tool registration and wrapper that calls the handler.
    @mcp.tool()
    async def add_daily_note_section(
        section_name: str, content: str, date_str: str = None, emoji: str = ""
    ) -> str:
        """Add a new section to the daily note.
    
        Creates a new section with a heading and initial content.
    
        Args:
            section_name: Name for the new section
            content: Initial content for the section
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
            emoji: Optional emoji to prefix the section heading (e.g., "📊", "💡")
    
        Returns:
            Confirmation message
        """
        return await daily_notes.add_daily_note_section(section_name, content, date_str, emoji)

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