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
| Name | Required | Description | Default |
|---|---|---|---|
| date_str | No |
Implementation Reference
- src/coach_ai/daily_notes.py:377-407 (handler)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 - src/coach_ai/obsidian.py:28-42 (handler)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 - src/coach_ai/server.py:712-720 (handler)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)