Skip to main content
Glama

deck_changeDeck

Move Anki flashcards to a different deck, automatically creating the target deck if it doesn't exist. Organize your study materials by transferring cards between decks.

Instructions

Moves cards with the given IDs to a different deck, creating the deck if it doesn't exist yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardsYesA list of card IDs to move.
deckYesThe target deck name.

Implementation Reference

  • Full tool handler implementation for changeDeck (prefixed to deck_changeDeck), including decorator, parameters (schema), and logic calling AnkiConnect API.
    @deck_mcp.tool( name="changeDeck", description="Moves cards with the given IDs to a different deck, creating the deck if it doesn't exist yet.", ) async def change_deck_tool( cards: Annotated[List[int], Field(description="A list of card IDs to move.")], deck: Annotated[str, Field(description="The target deck name.")], ) -> None: return await anki_call("changeDeck", cards=cards, deck=deck)
  • Registers all deck_mcp tools into the main anki_mcp server with the 'deck_' prefix, enabling the 'deck_changeDeck' tool.
    await anki_mcp.import_server("deck", deck_mcp)
  • Creates the sub-MCP instance (deck_mcp) where deck tools like changeDeck are registered.
    deck_mcp = FastMCP(name="AnkiDeckService")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ujisati/anki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server