Skip to main content
Glama

update_entry_backlinks

Update backlinks for diary entries by analyzing current content to automatically connect related journal entries in your Obsidian vault.

Instructions

Update the backlinks for an existing diary entry based on its current content.

Args: date: Date of the entry in YYYY-MM-DD format

Returns: Success message with updated backlinks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYes

Implementation Reference

  • The core handler function that executes the tool logic: parses date, reads diary entry, finds related entries and themes, adds Obsidian-compatible memory links, updates the file, and returns status.
    async def update_entry_backlinks( date: Annotated[str, "Date of the entry in YYYY-MM-DD format"] ) -> str: """Update the backlinks for an existing diary entry based on its current content.""" try: entry_date = datetime.strptime(date, "%Y-%m-%d") except ValueError: return "Error: Date must be in YYYY-MM-DD format" file_path = entry_manager.get_entry_path(entry_date) if not entry_manager.entry_exists(entry_date): return f"No memory log found for {date}" content = entry_manager.read_entry(file_path) related = await analysis_engine.find_related_entries(content, exclude_date=date) themes = await analysis_engine.extract_themes_and_topics(content) topic_tags = analysis_engine.generate_topic_tags(themes) content = entry_manager.add_memory_links(content, related, topic_tags) if entry_manager.write_entry(file_path, content): connection_types = [f"{len(related)} temporal"] if related else [] if topic_tags: connection_types.append(f"{len(topic_tags)} topic tags") connections_str = " + ".join(connection_types) if connection_types else "none found" return ( f"**Memory links updated** for {date}\n\n**Connections:** {connections_str}\n\n**Obsidian power:** Use Backlinks panel for temporal connections, Tags panel for topics, Graph view for visual exploration!" ) else: return "Error updating entry: Permission denied or I/O error"
  • The @mcp.tool decorator that registers 'update_entry_backlinks' with the FastMCP server, including tool metadata and behavioral hints.
    @mcp.tool( annotations={ "title": "Refresh Memory Links", "destructiveHint": False, "idempotentHint": False, "openWorldHint": False } )
  • Input schema definition using Pydantic Annotated type for the date parameter.
    date: Annotated[str, "Date of the entry in YYYY-MM-DD format"] ) -> str:

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/madebygps/obsidian-diary-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server