Skip to main content
Glama
anki-connect-mcp
by SolarianGG

deckPresets.assign

deckPresets_assign

Assign 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

NameRequiredDescriptionDefault
decksYesDecks to assign the preset to, each exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}.
presetYesDeck options preset: exactly one of {"id": "<presetId>"} or {"name": "<preset name>"}.
sessionNoOptional. 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.
rescheduleFsrsNoWith FSRS enabled, reschedule affected cards after the change. Default false.
timeoutSecondsNoMCP option (not sent to Anki): how long to wait for completion. A timeout does not cancel the work; the pending record is returned.
waitForCompletionNoMCP option (not sent to Anki): poll operations.get until the operation finishes and return its final record. If false, return the operation handle.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag write and non-destructive, and the description adds genuinely useful context beyond them: collection scope, operation-style completion, perItem undo granularity, the fact that the server blocks by default, and an enumerated error set including staleSession and editorConflict. It stops short of saying what happens to a deck's previously assigned preset, which is the key behavioral unknown for a reassignment tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, followed by compact labelled metadata lines (Scope/Effect/Completion/Undo) that scan quickly. The error list and the long-running note are dense but each carries distinct information; no sentence is redundant with another.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation with no output schema, the description covers effect, scope, undo granularity, blocking behavior and failure modes, which is close to what an agent needs. The remaining gap is outcome semantics — whether affected cards are rescheduled and whether prior assignments are replaced — but the core call contract is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents decks, preset, session, rescheduleFsrs, timeoutSeconds and waitForCompletion in detail. The description only gestures at the two wait options ('see waitForCompletion / timeoutSeconds') without adding semantics the schema lacks; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource ('Assign a preset') and the following metadata line pins it to the Anki-Connect method `deckPresets.assign`, which cleanly separates it from siblings like deckPresets_update or deckPresets_create. The trailing clause 'execute native dependent-card updates' is vaguer than the rest but doesn't obscure the core action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to reach for this tool versus deckPresets_update (editing preset config), decks_update, or deckPresets_get. The agent is told the effect is a write and that undo is perItem, but nothing about prerequisites, exclusions, or the alternative path for changing a deck's options.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools