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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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

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

With no annotations provided, the description carries the full burden. It successfully documents the append vs replace behavior and default date handling, but omits critical behavioral details like what happens if the section doesn't exist, whether the operation is idempotent, or specific error scenarios.

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?

Uses clear docstring format (Args/Returns) that efficiently organizes information. The first sentence establishes purpose immediately. Minor redundancy exists between the opening sentence and the 'Use this to...' sentence, but both add value (general action vs specific examples).

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?

Given the moderate complexity (4 parameters, 0% schema coverage, no annotations), the description adequately covers the parameter contracts and return value. It successfully explains the core mutation logic (append vs replace) necessary for safe invocation, though edge case behavior remains undocumented.

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

Parameters5/5

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

Excellent compensation for 0% schema description coverage. The Args section documents all four parameters (section, content, date_str, append) with clear semantics, examples ('Notes', 'Coach AI Insights'), format specifications (YYYY-MM-DD), and default value explanations.

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

Purpose4/5

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

The description clearly states the core action ('Write or append content') and target resource ('specific section in the daily note'). It implicitly distinguishes from sibling 'add_daily_note_section' by emphasizing writing/appending to existing sections rather than creating new ones, though an explicit contrast would strengthen this further.

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 concrete content examples ('summaries, insights, reflections') suggesting when to use the tool, but lacks explicit guidance on when to choose this over 'add_daily_note_section' or when to use append=True vs False. No prerequisites or error conditions are mentioned.

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