workflow_sync_check
Synchronize Zotero and Obsidian by detecting orphaned notes and deleted items. Supports bidirectional checks with dry-run mode.
Instructions
Bidirectional sync check between Zotero and Obsidian.
Three checks are performed depending on direction:
"trash_to_obs" — Zotero items in trash → find orphaned Obsidian notes. When auto_apply=True, deletes those Obsidian notes.
"obs_to_zotero" — Obsidian literature notes → find those whose Zotero item is gone (was deleted). When auto_apply=True, deletes orphan notes from Obsidian. Also finds Zotero items that had Obsidian notes created via workflow_attach_zotero_note but the note has since been deleted; when auto_apply=True, moves those Zotero items to trash.
"both" — runs both directions above.
Default is dry_run mode (auto_apply=False) — reports findings without making any changes. Review the output before setting auto_apply=True.
Args: direction: "trash_to_obs" | "obs_to_zotero" | "both" auto_apply: False (default) = report only. True = actually delete/trash.
Returns: { "trash_to_obs": { "zotero_trash_items": [...], "orphan_notes_found": [...], # notes to delete "deleted_notes": [...], # notes actually deleted (auto_apply=True) }, "obs_to_zotero": { "obsidian_notes_total": int, "orphan_notes": [...], # notes with no Zotero item → delete note "deleted_orphan_notes": [...], "items_note_deleted": [...], # Zotero items whose notes were removed "trashed_items": [...], # items actually trashed (auto_apply=True) }, "auto_apply": bool, "summary": str, }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| direction | No | both | |
| auto_apply | No |