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
| Name | Required | Description | Default |
|---|---|---|---|
| section_name | Yes | ||
| content | Yes | ||
| date_str | No | ||
| emoji | No |
Implementation Reference
- src/coach_ai/daily_notes.py:526-557 (handler)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')}." - src/coach_ai/server.py:777-794 (registration)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)