Skip to main content
Glama

deck_changeDeck

Move specified Anki flashcard IDs to a new or existing deck, simplifying deck organization and management directly through the MCP server.

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

  • The handler function for the deck_changeDeck tool. It takes a list of card IDs and a target deck name, then calls the AnkiConnect 'changeDeck' API to move the cards.
    @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 the deck service tools (including changeDeck as deck_changeDeck) by importing the deck_mcp server with 'deck' prefix into the main AnkiConnectMCP.
    await anki_mcp.import_server("deck", deck_mcp)
  • Creates the FastMCP instance named 'AnkiDeckService' to which the deck tools, including changeDeck, are registered via decorators.
    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