Skip to main content
Glama

card_suspend

Suspend specific Anki flashcards to temporarily pause their review schedule, helping you manage study sessions by focusing on active cards.

Instructions

Suspends the specified cards. Returns true on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardsYesA list of card IDs to suspend.

Implementation Reference

  • Handler function for the 'suspend' tool (prefixed to 'card_suspend' in main MCP) that suspends Anki cards by calling the AnkiConnect API.
    @card_mcp.tool( name="suspend", description="Suspends the specified cards. Returns true on success." ) async def suspend_cards_tool( cards: Annotated[List[int], Field(description="A list of card IDs to suspend.")], ) -> bool: return await anki_call("suspend", cards=cards)
  • Registers the card service tools with 'card_' prefix, making 'suspend' available as 'card_suspend'.
    await anki_mcp.import_server("card", card_mcp)
  • Utility function that makes HTTP POST requests to AnkiConnect API, used by card_suspend to invoke the 'suspend' action.
    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