cards.move
cards_moveMove Anki cards to an existing normal deck by card ID and destination deck name or ID, restoring cards' native state first when leaving a filtered deck.
Instructions
Move cards with Collection.set_deck and target-preset invariants.
Target must already exist and be normal. Moving out of a filtered deck restores native state first through the native move operation.
Anki-Connect method cards.move. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, invalidState, notFound, staleSession.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ids": "<ids>",
"deck": "<deck>"
},
"name": "cards_move"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Card IDs (decimal string, e.g. "1700000000001"). | |
| deck | Yes | Destination deck: exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}. | |
| session | No | Optional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from. |