deckPresets.assign
deckPresets_assignAssign a deck options preset to one or more Anki decks by ID or name, optionally rescheduling affected cards when FSRS is enabled.
Instructions
Assign a preset and execute native dependent-card updates.
Anki-Connect method deckPresets.assign. Scope: collection. Effect: write. Completion: operation. Undo: perItem.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
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": {
"decks": "<decks>",
"preset": "<preset>"
},
"name": "deckPresets_assign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decks | Yes | Decks to assign the preset to, each exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}. | |
| preset | Yes | Deck options preset: exactly one of {"id": "<presetId>"} or {"name": "<preset name>"}. | |
| 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. | |
| rescheduleFsrs | No | With FSRS enabled, reschedule affected cards after the change. Default false. | |
| timeoutSeconds | No | MCP option (not sent to Anki): how long to wait for completion. A timeout does not cancel the work; the pending record is returned. | |
| waitForCompletion | No | MCP option (not sent to Anki): poll operations.get until the operation finishes and return its final record. If false, return the operation handle. |