Skip to main content
Glama

card_unsuspend

Reactivate suspended Anki flashcards to resume studying. Specify card IDs to restore them to active review status.

Instructions

Unsuspends the specified cards. Returns true on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardsYesA list of card IDs to unsuspend.

Implementation Reference

  • The handler function `unsuspend_cards_tool` implements the logic for the `card_unsuspend` tool by calling AnkiConnect's unsuspend API via `anki_call`.
    @card_mcp.tool(
        name="unsuspend",
        description="Unsuspends the specified cards. Returns true on success.",
    )
    async def unsuspend_cards_tool(
        cards: Annotated[List[int], Field(description="A list of card IDs to unsuspend.")],
    ) -> bool:
        return await anki_call("unsuspend", cards=cards)
  • Registers the card_mcp server (containing the unsuspend tool) into the main anki_mcp server with the "card_" prefix, making the tool available as "card_unsuspend".
    async def setup(run_server: bool = True):
        await anki_mcp.import_server("deck", deck_mcp)
        await anki_mcp.import_server("note", note_mcp)
        await anki_mcp.import_server("card", card_mcp)
        await anki_mcp.import_server("model", model_mcp)
        await anki_mcp.import_server("media", media_mcp)
        if run_server:
            await anki_mcp.run_async()
  • Supporting utility function `anki_call` that performs HTTP POST to AnkiConnect API, used by the tool handler to execute the unsuspend 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                                                                        
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the return value ('Returns true on success'), which is helpful, but lacks critical details: it doesn't specify what happens on failure (e.g., error handling), whether unsuspension is reversible, permission requirements, or rate limits. For a mutation tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (two short sentences) and front-loaded with the core action. Every word earns its place: the first sentence states the purpose, and the second adds critical behavioral information about the return value, with zero wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a mutation operation with one parameter) and no annotations or output schema, the description is minimally adequate. It covers the basic action and return value but lacks details on error conditions, side effects, and usage context. For a tool that changes card state, more completeness would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'cards' well-documented in the schema as 'A list of card IDs to unsuspend.' The description adds no additional parameter semantics beyond what's in the schema, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('unsuspends') and resource ('specified cards'), making the purpose immediately understandable. It distinguishes from sibling tools like 'card_suspend' by specifying the opposite action. However, it doesn't explicitly differentiate from other card modification tools like 'card_setSpecificValueOfCard'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., cards must be suspended first), when-not scenarios, or direct comparisons with sibling tools like 'card_suspend' or 'card_setSpecificValueOfCard' for card state management.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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