Skip to main content
Glama

card_suspended

Check if a specific Anki flashcard is suspended by its ID to verify study status and manage card visibility.

Instructions

Checks if a single card is suspended by its ID. Returns true if suspended, false otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardYesThe ID of the card.

Implementation Reference

  • Handler for the 'suspended' tool (prefixed to 'card_suspended' by the main server). Calls AnkiConnect's 'suspended' action to check if a card is suspended.
    @card_mcp.tool(
        name="suspended",
        description="Checks if a single card is suspended by its ID. Returns true if suspended, false otherwise.",
    )
    async def check_card_suspended_tool(
        card: Annotated[int, Field(description="The ID of the card.")],
    ) -> bool:
        return await anki_call("suspended", card=card)
  • Registers the card_mcp tools with 'card' prefix in the main AnkiMCP server, making 'suspended' available as 'card_suspended'.
    await anki_mcp.import_server("card", card_mcp)
  • Common helper function used by all tool handlers to invoke AnkiConnect API endpoints via HTTP POST.
    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                                                                        
  • Creates the FastMCP instance for card-related tools, where individual tools like 'suspended' are registered via decorators.
    card_mcp = FastMCP(name="AnkiCardService")
Behavior2/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 states the return value (true/false) but lacks details on error handling, permissions required, rate limits, or what happens with invalid card IDs. For a read operation with zero annotation coverage, this leaves behavioral 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 two sentences with zero waste: the first states the purpose, the second specifies the return value. It is front-loaded and appropriately sized for a simple lookup tool.

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 low complexity (single parameter, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and return value but lacks behavioral context like error cases or performance characteristics, which would be helpful for an agent.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents the single parameter 'card' as an integer ID. The description adds no additional parameter semantics beyond what the schema provides, but with only one parameter and high coverage, the baseline is appropriately high.

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 ('Checks if a single card is suspended') and resource ('by its ID'), distinguishing it from siblings like card_suspend and card_unsuspend. It precisely defines the tool's function without being tautological.

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

Usage Guidelines3/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 a single card by ID, but does not explicitly state when to use this versus alternatives like card_areSuspended (which might handle multiple cards) or other card-related tools. No exclusions or prerequisites are mentioned.

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