Skip to main content

sync

Universal sync tool for reading history, enrichment, and Libby tag metadata.

Parameters

ParameterTypeRequiredDescription
actionstringNoAction to perform (default: status)
targetstringNoTarget system (default: hardcover)
entry_idstringNoFor details action
limitintNoFor run/sync_all action: max entries
dry_runboolNoFor run/sync_all action: preview only
unmatched_typestringNoFor unmatched action: isbn, no_isbn, all

Actions (Progressive Disclosure)

ActionDescription
statusShow pending count, last sync, error summary
previewList books that will be synced
runExecute history sync only
sync_allComprehensive: history + enrichment + tag metadata
detailsShow sync state for specific entry
unmatchedShow books that failed to match

Examples

{}
{"action": "status"}
{"action": "preview"}
{"action": "run"}
{"action": "sync_all"}
{"action": "sync_all", "dry_run": true}
{"action": "details", "entry_id": "abc123"}
{"action": "unmatched", "unmatched_type": "isbn"}

sync_all Flow

The comprehensive sync runs four steps:

  1. Import current loans — Fetches active Libby checkouts to local history
  2. Sync history — Marks returned books as "read" in Hardcover
  3. Enrich metadata — Starts background enrichment job for unenriched books
  4. Cache tag metadata — Syncs Libby tagged books with full book info

Typical Workflow

1. sync action="status"      → Check what's pending
2. sync action="preview" → See what will sync
3. sync action="run" → Execute (or sync_all for everything)
4. sync action="unmatched" → Review failures