Skip to main content
Glama

deck_deckNames

Retrieve all deck names for the current user to manage Anki flashcards efficiently. Simplifies access and organization of study materials.

Instructions

Gets the complete list of deck names for the current user. Returns a list of deck names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'deck_deckNames' tool. It calls `anki_call('deckNames')` to retrieve the list of deck names via AnkiConnect API.
    @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")
  • Registers all tools from `deck_mcp` (including 'deckNames') under the 'deck_' namespace, making it available as 'deck_deckNames' in the main MCP server.
    await anki_mcp.import_server("deck", deck_mcp)
  • The `anki_call` helper function used by the handler to make HTTP requests to the AnkiConnect API at http://127.0.0.1:8765.
    async def anki_call(action: str, **params: Any) -> Any: async with httpx.AsyncClient() as client: payload = {"action": action, "version": 6, "params": params} result = await client.post(ANKICONNECT_URL, json=payload) result.raise_for_status() result_json = result.json() error = result_json.get("error") if error: raise Exception(f"AnkiConnect error for action '{action}': {error}") response = result_json.get("result") if "result" in result_json: return response return result_json

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