Skip to main content
Glama

sync_from_daily_note

Extract tasks from your daily note and sync them into Coach AI's system to refresh task management and maintain current productivity tracking.

Instructions

Read today's (or specified) daily note and sync tasks.

Extracts tasks from your daily note and ensures they're in the system. Call this to refresh Coach AI's view of your daily note.

Args: date_str: Optional date in YYYY-MM-DD format (defaults to today)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
date_strNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Tool registration for sync_from_daily_note in server.py
    async def sync_from_daily_note(date_str: str = None) -> str:
        """Read today's (or specified) daily note and sync tasks.
    
        Extracts tasks from your daily note and ensures they're in the system.
        Call this to refresh Coach AI's view of your daily note.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
        """
        return await daily_notes.sync_from_daily_note(date_str)
  • Core logic implementation for sync_from_daily_note in daily_notes.py
    async def sync_from_daily_note(date_str: str = None) -> str:
        """Read today's (or specified) daily note and sync tasks.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
    
        Returns:
            Summary of tasks and accomplishments
        """
        vault = get_vault()
        if not vault:
            return "❌ Obsidian vault not configured. Set OBSIDIAN_VAULT_PATH environment variable."
    
        # Parse date
        if date_str:
            try:
                date = datetime.strptime(date_str, "%Y-%M-%d")
            except ValueError:
                return f"❌ Invalid date format. Use YYYY-MM-DD, got: {date_str}"
        else:
            date = datetime.now()
    
        # Read note
        note_data = vault.read_daily_note(date)
    
        if not note_data:
            return f"ℹ️  No daily note found for {date.strftime('%Y-%m-%d')}. Want me to create one?"
    
        # Extract data
        tasks = note_data["tasks"]
        accomplishments = note_data["accomplishments"]
    
        # Build response
        result = f"📖 Read daily note: {note_data['path']}\n\n"
    
        if tasks:
            active_tasks = [t for t in tasks if not t["completed"]]
            completed_tasks = [t for t in tasks if t["completed"]]
    
            result += f"**Active Tasks:** {len(active_tasks)}\n"
            for task in active_tasks[:5]:  # Show first 5
                priority_emoji = (
                    "🔴"
                    if task["priority"] == "high"
                    else "🟡" if task["priority"] == "medium" else "🔵"
                )
                result += f"{priority_emoji} {task['text']}\n"
    
            if len(active_tasks) > 5:
                result += f"... and {len(active_tasks) - 5} more\n"
    
            result += f"\n**Completed Today:** {len(completed_tasks)}\n"
    
        else:
            result += "No tasks found in daily note.\n"
    
        if accomplishments:
            result += f"\n**Accomplishments:** {len(accomplishments)}\n"
            for acc in accomplishments[:3]:
                result += f"✅ {acc}\n"
    
        return result
Behavior3/5

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

Since no annotations are provided, the description carries the full burden. It explains that tasks are extracted and synced to 'the system,' implying a write side effect, but fails to disclose safety properties (destructive vs. safe), idempotency guarantees, or what 'sync' specifically entails (create, update, or delete operations).

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 front-loading: a one-line summary, behavioral explanation, usage guidance, and Args section. No redundant or wasted sentences, though the 'Args' header could be omitted in favor of natural language integration.

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

Completeness3/5

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

Adequately covers the input parameter and basic purpose given the output schema exists (excusing it from explaining return values). However, for a synchronization tool with implied side effects, the description omits important behavioral context like error handling, transactionality, or conflict resolution strategies.

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?

With 0% schema description coverage, the description fully compensates by documenting the single parameter in the Args section: it specifies the YYYY-MM-DD format and clarifies that it defaults to 'today' when omitted, adding critical semantic meaning absent from the schema.

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 tool 'reads' and 'syncs tasks' using specific verbs, and clarifies it 'extracts tasks from your daily note and ensures they're in the system.' It distinguishes from pure reading tools (like read_daily_note_full) by emphasizing the syncing aspect, though it could better differentiate from the similarly-named sibling 'sync_daily_note'.

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 ('Call this to refresh Coach AI's view of your daily note') which suggests when to invoke it. However, it lacks explicit guidance on when NOT to use it or which sibling tools to use instead (e.g., read_daily_note_full for non-syncing reads).

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