Skip to main content
Glama

Manage decks

manage_decks
Destructive

Create, list, inspect, configure, rename, and delete Anki decks, move cards between them, and set per-deck daily limits for deck organization.

Instructions

Create, list, inspect, configure, rename and delete Anki decks, and move cards between them. Use this for deck organization and per-deck daily limits; use manage_flashcards for card content. To suspend/unsuspend cards (e.g. pause a deck), use manage_scheduling.

Operations:

  • list: read-only; all deck names and IDs.

  • create: needs deckName (use "Parent::Child" for subdecks). Optional newPerDay and/or reviewsPerDay give the new deck its own daily limits (see set_limits). Does nothing if the deck already exists.

  • set_limits: needs deckName plus newPerDay and/or reviewsPerDay. Changes daily limits for this deck only: if the deck uses a shared options preset (e.g. "Default"), the preset is cloned into a new preset named after the deck, assigned to the deck, and only the clone is changed. Other decks are never affected. Cloned presets stay in Anki; deleting one later (in Anki's Deck Options) forces a full sync.

  • get_stats: read-only; today's due counts per deck ("what's due today?"). deckName (one deck) or deckNames (array). One line per deck: total cards and new/learning/review due today. Unknown names are reported, never created. For progress over time, use get_analytics deck_overview; for counts by tag or state, manage_flashcards find with groupBy.

  • get_config: read-only; needs deckName. Readable summary of the deck's options preset: name/ID and which other decks share it, daily limits, learning/relearning steps, leeches, burying, max interval, FSRS desired retention, and display order as named values. raw: true returns the full preset JSON instead (FSRS parameters included).

  • set_display_order: needs deckName plus any of newGatherOrder (deck, deck_then_random_notes, ascending_position, descending_position, random_notes, random_cards), newSortOrder (card_type_then_gathered, gathered, card_type_then_random, random_note_then_card_type, random), reviewOrder (due_date_then_random, due_date_then_deck, deck_then_due_date, ascending/descending_intervals, ascending/descending_ease, ascending/descending_retrievability, relative_overdueness, random, order_added, reverse_order_added), newReviewMix and interdayLearningMix (mix_with_reviews, after_reviews, before_reviews). Same shared-preset safety as set_limits; reports each change as old → new. For random new cards, set newGatherOrder random_notes (newSortOrder random only shuffles the cards already gathered). Anki uses the display order of the deck you study, not its subdecks'.

  • set_config: needs deckNames and configId; assigns an existing options preset to the decks.

  • rename: needs deckName and newName. Subdecks follow; cards keep their scheduling and each deck keeps its options preset. Refuses if newName already exists with cards. Anki's "studied today" counters start fresh for the renamed deck.

  • move_cards: needs targetDeck plus cardIds OR query (Anki search, e.g. 'deck:"Old" tag:x'; any number of cards). Reports the count and source decks. dryRun: true reports what would move without moving (only move_cards takes dryRun).

  • delete: needs deckNames. Permanently deletes the decks AND all their cards (deleteCards must not be false; AnkiConnect always deletes cards) and reports how many cards each held. Deleting a filtered deck returns its cards to their home decks instead. requireEmpty: true refuses if any deck has cards that would be deleted. Cannot be undone.

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": {
      "operation": "<operation>"
    },
    "name": "manage_decks"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNoget_config: true returns the full preset JSON instead of the summary
queryNomove_cards: Anki search query selecting the cards to move instead of cardIds, e.g. 'deck:"Old" tag:verbs'
dryRunNomove_cards only: report how many cards match, from which decks, without moving them. Rejected for other operations
cardIdsNomove_cards: card IDs to move (or use query)
newNameNorename: the new deck name (subdecks follow)
configIdNoset_config: ID of an existing options preset (see get_config)
deckNameNocreate/rename/set_limits/set_display_order/get_stats/get_config: deck name; use "Parent::Child" for subdecks
deckNamesNodelete/set_config: deck names to act on. get_stats: several decks at once
newPerDayNocreate/set_limits: max new cards per day for this deck only
operationYesWhich operation to run; see the tool description for required parameters
targetDeckNomove_cards: destination deck (created if missing)
deleteCardsNodelete: must be true or omitted; AnkiConnect always deletes a deck together with its cards
reviewOrderNoset_display_order: order of review cards
newReviewMixNoset_display_order: when new cards show relative to reviews
newSortOrderNoset_display_order: how gathered new cards are ordered
requireEmptyNodelete: refuse (and delete nothing) if any of the decks has cards
reviewsPerDayNocreate/set_limits: max reviews per day for this deck only
newGatherOrderNoset_display_order: which new cards are gathered for today
interdayLearningMixNoset_display_order: when interday learning cards show relative to reviews

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv1.3.0
    • changedInput schema / properties / cardIds / description
      Previous value: -"move_cards: card IDs to move"New value: +"move_cards: card IDs to move (or use query)"
    • changedInput schema / properties / deckName / description
      Previous value: -"create/set_limits/get_stats/get_config: deck name; use \"Parent::Child\" for subdecks"New value: +"create/rename/set_limits/set_display_order/get_stats/get_config: deck name; use \"Parent::Child\" for subdecks"
    • changedInput schema / properties / deckNames / description
      Previous value: -"delete/set_config: deck names to act on"New value: +"delete/set_config: deck names to act on. get_stats: several decks at once"
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "description": "move_cards only: report how many cards match, from which decks, without moving them. Rejected for other operations",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / interdayLearningMix
      Added value: +{
      +  "description": "set_display_order: when interday learning cards show relative to reviews",
      +  "enum": [
      +    "mix_with_reviews",
      +    "after_reviews",
      +    "before_reviews"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / newGatherOrder
      Added value: +{
      +  "description": "set_display_order: which new cards are gathered for today",
      +  "enum": [
      +    "deck",
      +    "deck_then_random_notes",
      +    "ascending_position",
      +    "descending_position",
      +    "random_notes",
      +    "random_cards"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / newName
      Added value: +{
      +  "description": "rename: the new deck name (subdecks follow)",
      +  "type": "string"
      +}
    • addedInput schema / properties / newReviewMix
      Added value: +{
      +  "description": "set_display_order: when new cards show relative to reviews",
      +  "enum": [
      +    "mix_with_reviews",
      +    "after_reviews",
      +    "before_reviews"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / newSortOrder
      Added value: +{
      +  "description": "set_display_order: how gathered new cards are ordered",
      +  "enum": [
      +    "card_type_then_gathered",
      +    "gathered",
      +    "card_type_then_random",
      +    "random_note_then_card_type",
      +    "random"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / operation / enum
      Previous value: -[
      -  "create",
      -  "delete",
      -  "list",
      -  "get_stats",
      -  "move_cards",
      -  "get_config",
      -  "set_config",
      -  "set_limits"
      -]New value: +[
      +  "create",
      +  "rename",
      +  "delete",
      +  "list",
      +  "get_stats",
      +  "move_cards",
      +  "get_config",
      +  "set_config",
      +  "set_limits",
      +  "set_display_order"
      +]
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "move_cards: Anki search query selecting the cards to move instead of cardIds, e.g. 'deck:\"Old\" tag:verbs'",
      +  "type": "string"
      +}
    • addedInput schema / properties / raw
      Added value: +{
      +  "description": "get_config: true returns the full preset JSON instead of the summary",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / requireEmpty
      Added value: +{
      +  "description": "delete: refuse (and delete nothing) if any of the decks has cards",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / reviewOrder
      Added value: +{
      +  "description": "set_display_order: order of review cards",
      +  "enum": [
      +    "due_date_then_random",
      +    "due_date_then_deck",
      +    "deck_then_due_date",
      +    "ascending_intervals",
      +    "descending_intervals",
      +    "ascending_ease",
      +    "descending_ease",
      +    "ascending_retrievability",
      +    "descending_retrievability",
      +    "relative_overdueness",
      +    "random",
      +    "order_added",
      +    "reverse_order_added"
      +  ],
      +  "type": "string"
      +}
  2. Changed12 schema fields changedv0.7.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / cardIds / description
      Previous value: -"Card IDs to move"New value: +"move_cards: card IDs to move"
    • changedInput schema / properties / configId / description
      Previous value: -"Config ID to apply"New value: +"set_config: ID of an existing options preset (see get_config)"
    • changedInput schema / properties / deckName / description
      Previous value: -"Deck name"New value: +"create/set_limits/get_stats/get_config: deck name; use \"Parent::Child\" for subdecks"
    • changedInput schema / properties / deckNames / description
      Previous value: -"Deck names (for batch operations)"New value: +"delete/set_config: deck names to act on"
    • changedInput schema / properties / deleteCards / description
      Previous value: -"Delete cards when deleting deck"New value: +"delete: must be true or omitted; AnkiConnect always deletes a deck together with its cards"
    • addedInput schema / properties / newPerDay
      Added value: +{
      +  "description": "create/set_limits: max new cards per day for this deck only",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / operation / description
      Previous value: -"Deck management operation"New value: +"Which operation to run; see the tool description for required parameters"
    • changedInput schema / properties / operation / enum
      Previous value: -[
      -  "create",
      -  "delete",
      -  "list",
      -  "get_stats",
      -  "move_cards",
      -  "get_config",
      -  "set_config"
      -]New value: +[
      +  "create",
      +  "delete",
      +  "list",
      +  "get_stats",
      +  "move_cards",
      +  "get_config",
      +  "set_config",
      +  "set_limits"
      +]
    • addedInput schema / properties / reviewsPerDay
      Added value: +{
      +  "description": "create/set_limits: max reviews per day for this deck only",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / targetDeck / description
      Previous value: -"Target deck for moving cards"New value: +"move_cards: destination deck (created if missing)"
  3. Addedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the annotations, the description discloses that delete is permanent and cannot be undone, that all cards go with the deck, that filtered decks instead return cards home, and that requireEmpty blocks destructive execution. It also surfaces non-obvious side effects annotations cannot express: set_limits/set_display_order clone a shared preset so other decks are unaffected, cloned presets survive and later deletion forces a full sync, and rename resets 'studied today' counters. The only gap is that no operation-level readOnly guidance exists for a tool annotated destructiveHint=true overall — the description mitigates this by labeling list/get_stats/get_config read-only inline, so no contradiction arises.

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?

Given ten operations and 19 parameters, the structure — a scope sentence, sibling routing, then a bulleted operation list — is the right shape and the highest-value constraints are front-loaded. Some bullets are dense (set_display_order enumerates every enum value that the schema already lists), which is mild redundancy rather than waste.

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

Completeness5/5

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

For a 19-parameter, multi-operation, annotation-light-on-detail tool with no output schema, the description covers required inputs per operation, return shape ('one line per deck: total cards and new/learning/review due today', 'reports the count and source decks', 'reports each change as old → new'), and irreversibility. An agent can call this correctly without guessing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description goes further by explaining semantics the schema can't, notably the newGatherOrder 'random_notes' versus newSortOrder 'random' distinction ('random only shuffles the cards already gathered'). It also clarifies deleteCards must not be false and that dryRun is exclusive to move_cards. It does not explain the enum vocabularies for reviewOrder or the display-order values, leaving those to the schema.

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

Purpose5/5

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

The first sentence names concrete verbs and the precise resource (Anki decks, card movement), and immediately scopes it against siblings: 'use manage_flashcards for card content' and 'To suspend/unsuspend cards ... use manage_scheduling.' Each of the ten operations is then enumerated with a one-line definition, so an agent can map an intent to an operation without opening the schema.

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

Usage Guidelines5/5

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

Explicit routing exists for the ambiguous cases: progress-over-time goes to get_analytics deck_overview, counts-by-tag/state goes to manage_flashcards find with groupBy, pausing a deck goes to manage_scheduling. Within the tool, per-operation needed parameters are stated (e.g. 'get_config: read-only; needs deckName'), and the get_stats section notes unknown names are reported, never created — a real behavioral constraint.

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