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
| Name | Required | Description | Default |
|---|---|---|---|
| cards | Yes | A list of card IDs to move. | |
| deck | Yes | The target deck name. |
Implementation Reference
- src/anki_mcp/deck_service.py:68-76 (handler)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)
- src/anki_mcp/__init__.py:23-23 (registration)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)
- src/anki_mcp/deck_service.py:8-8 (registration)Creates the sub-MCP instance (deck_mcp) where deck tools like changeDeck are registered.deck_mcp = FastMCP(name="AnkiDeckService")