sync
Synchronize collection with AnkiWeb (asynchronous job: sync() starts a sync, sync(jobid) polls its status, sync(jobid, resolve=...) resolves a full-sync conflict)
How to use it
sync is exposed by the Anki MCP Server Addon MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the sync tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Anki MCP Server Addon
claude mcp add anki --transport http http://127.0.0.1:3141/Other tools in Anki MCP Server Addon (39)
Add a new note to a deck
Batch-add up to maxnotesperbatch notes (default 100) sharing the same deck and model. Uses Anki's native batch API for atomic undo. Supports partial success — individual failures don't affect others
Manage cards with 9 actions: reposition (set learning order), changedeck (move between decks), bury/unbury (hide until tomorrow), suspend/unsuspend (indefinitely exclude from review), setflag (color flags 0-7), setduedate (reschedule with days DSL), forgetcards (reset to new)
Bulk per-card scheduling stats for a deck (incl. subdecks): type/queue/interval/tags/dueToday, paginated. FSRS-independent, compact payload for analytics
Move existing notes to a different note type, remapping fields by name ({old field: new field or null}). Destructive — hidden unless opted in via enableddestructivetools. Two-step flow: dryrun=true returns the resolved plan (mapping, dropped fields, cards removed), then the same call with dryrun=fal
Create a new deck
Create a new note type
Move a media file to Anki's trash (recoverable via Check Media)
Delete notes from the collection
still applies on top — an opted-in tool can still be disabled
Filtered deck lifecycle with 5 actions: createorupdate (create or modify a filtered deck from 1-2 search terms — Anki's hard limit), rebuild (repopulate), empty (return cards to home decks), delete (return cards, then remove the deck), getinfo (read-only inspection of up to 50 deck IDs per call — re
Search for notes using Anki's search syntax. includefirstfield=true adds a noteLabels array ({noteId, firstField, truncated, fullLength}) so you can search and label notes in one call
Get FSRS memory state (stability, difficulty, retrievability) for cards
Get next due card for review (supports skipimages/skipaudio for voice mode)
Get FSRS scheduler parameters for deck presets
List media files matching a pattern
Open the Add Cards dialog
Open the card browser with a search query
Get info about the currently displayed card
Open the note editor for a specific note
Show the answer side of current card
Show the question side of current card
List all decks in the collection
Get field names and descriptions for a note type
Manage fields on an existing note type: add (optionally at a 0-based index), rename (preserves content; card templates are not auto-updated), reposition (reorder). A remove action also exists but is destructive — hidden unless opted in via enableddestructivetools. add, remove and reposition change f
List available note types
Get CSS styling for a note type. includelatex=true also returns the LaTeX preamble (latexpre, latexpost, latexsvg)
Read the Front/Back HTML templates for each card type in a note type
Get detailed information about notes. excerptchars caps every field value at that many characters, marking each with truncated/fullLength — a cheap way to survey many notes
Run FSRS parameter optimization using Anki's built-in optimizer
Get card content for review
Rate a card after review (Again/Hard/Good/Easy)
Update FSRS parameters (weights, desired retention, max interval)
Store a media file (image/audio) via base64, file path, or URL. File paths are validated against a media-type allowlist; URLs are checked for SSRF
Manage tags with 6 actions: addtags/removetags (bulk add/remove on notes), replacetags (swap one tag for another), gettags (list all, or scoped to a deck via the optional deck param — distinct tags on notes with a card in that deck, subdecks included), clearunusedtags (remove orphans), batchtags (ap
Update CSS styling for a note type — full replace, or patch via oldstr/newstr (must match exactly once). Can also write the LaTeX preamble (latexpre/latexpost/latexsvg)
Update Front/Back template HTML — full replace, or patch via oldstr/newstr (must match exactly once). Rejects unrecognized keys (case-sensitive) and unknown template names up front, applying all edits atomically — a failed call leaves the model unchanged
Update fields of existing notes. Two modes: full replace, or patch via oldstr/newstr (find-and-replace within a field; must match exactly once or nothing is written)
Batch-update fields of multiple notes in one atomic undo step (single backend call). Validates every entry first; supports partial success up to maxnotesperbatch