Skip to main content
Glama

read_daily_note_section

Extract specific sections like Notes or Tasks from daily notes to quickly access organized information without reading entire documents.

Instructions

Read a specific section from the daily note.

Use this to read any section by name, such as "Notes", "Tasks", "Focus for Today", etc.

Args: date_str: Optional date in YYYY-MM-DD format (defaults to today) section: Name of the section to read (without ## or emoji)

Returns: Content of that section

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
date_strNo
sectionNoNotes

Implementation Reference

  • The implementation of the logic to read a daily note section.
    async def read_daily_note_section(date_str: str = None, section: str = "Notes") -> str:
        """Read a specific section from the daily note.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
            section: Name of the section to read
    
        Returns:
            Content of that section
        """
        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()
    
        section_content = vault.read_section(date, section)
    
        if section_content is None:
            return f"❌ Section '{section}' not found in daily note for {date.strftime('%Y-%m-%d')}."
    
        return f"## {section}\n\n{section_content}"
  • The tool registration using the @mcp.tool() decorator.
    @mcp.tool()
    async def read_daily_note_section(date_str: str = None, section: str = "Notes") -> str:
        """Read a specific section from the daily note.
    
        Use this to read any section by name, such as "Notes", "Tasks",
        "Focus for Today", etc.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
            section: Name of the section to read (without ## or emoji)
    
        Returns:
            Content of that section
        """
        return await daily_notes.read_daily_note_section(date_str, section)

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