Skip to main content
Glama

get_daily_note_path

Retrieve the file path for today's or a specified date's daily note to open in Obsidian or check its existence.

Instructions

Get the file path to today's (or specified) daily note.

Useful for opening the note in Obsidian or checking if it exists.

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

  • The primary handler function in the logic layer that coordinates retrieving the vault and formatting the daily note path.
    async def get_daily_note_path(date_str: str = None) -> str:
        """Get the file path to today's (or specified) daily note.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
    
        Returns:
            Path and existence status
        """
        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()
    
        note_path = vault.get_daily_note_path(date)
        exists = note_path.exists()
    
        result = f"📄 Daily note path: {note_path}\n"
        result += f"Status: {'✅ Exists' if exists else '❌ Does not exist'}\n"
    
        if not exists:
            result += "\nWant me to create it? Just ask: 'Create my daily note'"
    
        return result
  • The core implementation method within the Obsidian vault class that constructs the absolute path to the daily note file.
    def get_daily_note_path(self, date: datetime = None) -> Path:
        """Get path to a daily note.
    
        Args:
            date: Date for the note (defaults to today)
    
        Returns:
            Path to the daily note file
        """
        if date is None:
            date = datetime.now()
    
        date_str = date.strftime("%Y-%m-%d")
        note_path = self.daily_notes_format.replace("{date}", date_str)
        return self.vault_path / note_path
  • The server-side endpoint handler for the MCP tool that delegates to the daily_notes module.
    async def get_daily_note_path(date_str: str = None) -> str:
        """Get the file path to today's (or specified) daily note.
    
        Useful for opening the note in Obsidian or checking if it exists.
    
        Args:
            date_str: Optional date in YYYY-MM-DD format (defaults to today)
        """
        return await daily_notes.get_daily_note_path(date_str)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It implies a read-only operation but does not clarify critical behavioral details: does it verify file existence or merely construct a path? Does it return an error if the note is missing? The mention of 'checking if it exists' hints at validation logic that is left undefined.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear separation: one-line purpose statement, usage context, and Args block. Information is front-loaded with no redundant text; every sentence earns its place.

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 tool has an output schema (not shown but indicated) and only one optional parameter, the description is appropriately complete. It covers the essential behavioral context for a simple path-retrieval tool, though it could explicitly state that it returns the path without creating the file.

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 specifying the date format ('YYYY-MM-DD') and default behavior ('defaults to today'), providing essential semantic information absent from the structured schema.

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

Purpose5/5

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

The description uses a specific verb ('Get') with a clear resource ('file path to today's...daily note'), explicitly distinguishing this from sibling tools like create_daily_note (which creates) and read_daily_note_full (which reads content).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides concrete use cases ('opening the note in Obsidian', 'checking if it exists') that signal when to invoke the tool. However, it does not explicitly name alternatives like read_daily_note_full or clarify when to prefer this over other daily note operations.

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