Skip to main content
Glama

card_areSuspended

Check if specific Anki flashcards are suspended by providing card IDs, returning a boolean status for each card to help manage study sessions.

Instructions

Returns an array indicating whether each given card is suspended. Each item is boolean or null if the card doesn't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardsYesA list of card IDs.

Implementation Reference

  • The core handler function for the 'card_areSuspended' tool (prefixed from 'areSuspended'). It takes a list of card IDs and returns whether each is suspended by calling the AnkiConnect 'areSuspended' API.
    @card_mcp.tool(
        name="areSuspended",
        description="Returns an array indicating whether each given card is suspended. Each item is boolean or null if the card doesn't exist.",
    )
    async def check_cards_suspended_tool(
        cards: Annotated[List[int], Field(description="A list of card IDs.")],
    ) -> List[Optional[bool]]:
        return await anki_call("areSuspended", cards=cards)
  • Registration of the card service into the main MCP server, prefixing its tools with 'card_' (e.g., 'areSuspended' becomes 'card_areSuspended').
    await anki_mcp.import_server("card", card_mcp)
  • Helper function used by all tool handlers to make HTTP calls to the AnkiConnect API.
    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                                                                        
  • Import of the card_mcp server instance.
    from .card_service import card_mcp
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the return format (array of booleans/null) and behavior for non-existent cards, which is useful. However, it lacks details on permissions, rate limits, or error handling, leaving gaps for a read operation.

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 a single, efficient sentence that front-loads the core functionality and includes essential details (return type, handling of non-existent cards). There is no wasted verbiage, making it highly concise and well-structured.

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 no annotations and no output schema, the description covers the basic purpose and return format adequately. However, for a tool with potential complexity (e.g., batch processing, error cases), it lacks completeness in areas like authentication needs or response structure details.

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 parameter 'cards' documented as 'A list of card IDs.' The description adds minimal value by implying the parameter is used to check suspension, but doesn't provide additional semantics like ID format or constraints beyond the schema.

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

Purpose5/5

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

The description clearly states the specific action ('Returns an array indicating whether each given card is suspended') and resource ('card'), distinguishing it from siblings like card_suspended (which likely checks suspension status differently) and card_suspend/unsuspend (which modify suspension). It explicitly handles non-existent cards with null values, adding precision.

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

Usage Guidelines4/5

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

The description implies usage for checking suspension status of multiple cards by IDs, with no explicit alternatives or exclusions. It doesn't specify when to use this over card_suspended or other siblings, but the context is clear for batch status queries.

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