deck_deckNames
Retrieve all deck names from Anki to view and manage your flashcard collections efficiently.
Instructions
Gets the complete list of deck names for the current user. Returns a list of deck names.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/anki_mcp/deck_service.py:29-34 (handler)Handler function for the 'deck_deckNames' tool (internally named 'deckNames' in deck_mcp). It calls anki_call('deckNames') to fetch and return the list of deck names.@deck_mcp.tool( name="deckNames", description="Gets the complete list of deck names for the current user. Returns a list of deck names.", ) async def list_deck_names_tool() -> List[str]: return await anki_call("deckNames")
- src/anki_mcp/__init__.py:23-23 (registration)Registers the deck_mcp server under the 'deck' prefix in the main anki_mcp, making tools like 'deckNames' available as 'deck_deckNames'.await anki_mcp.import_server("deck", deck_mcp)
- src/anki_mcp/deck_service.py:8-8 (registration)Creates the FastMCP instance 'deck_mcp' (named 'AnkiDeckService') to which the deck tools, including 'deckNames', are attached.deck_mcp = FastMCP(name="AnkiDeckService")
- src/anki_mcp/deck_service.py:6-6 (helper)Imports the anki_call helper function used by the deck_deckNames handler to invoke the underlying AnkiConnect API.from .common import anki_call