Skip to main content
Glama

card_cardsInfo

Retrieve detailed information for specific Anki flashcard IDs to access card data and review status.

Instructions

Returns a list of objects containing information for each card ID provided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardsYesA list of card IDs.

Implementation Reference

  • Registers the card service tools with the 'card_' prefix (e.g., cardsInfo becomes card_cardsInfo).
    await anki_mcp.import_server("card", card_mcp)
  • The tool handler decorated with name='cardsInfo'. Defines the schema via decorator and parameters, and implements logic by proxying to AnkiConnect's 'cardsInfo' via anki_call.
    @card_mcp.tool(
        name="cardsInfo",
        description="Returns a list of objects containing information for each card ID provided.",
    )
    async def get_cards_info_tool(
        cards: Annotated[List[int], Field(description="A list of card IDs.")],
    ) -> List[Dict[str, Any]]:
        return await anki_call("cardsInfo", cards=cards)
  • Shared helper function that performs the actual HTTP call to AnkiConnect API for all tools.
    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?

No annotations are provided, so the description carries the full burden. It states this is a read operation ('Returns'), but doesn't disclose behavioral traits such as error handling (e.g., invalid card IDs), performance (e.g., limits on list size), or output format (e.g., what fields are included in the 'objects'). This leaves significant gaps for safe and effective use.

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 key action and resource. There's no wasted verbiage or redundancy, making it easy to parse quickly while conveying the essential purpose.

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

Completeness2/5

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

Given the complexity (a read operation with one parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'information' is returned (e.g., card fields, status), how errors are handled, or any usage limits, which are critical for an agent to invoke this tool correctly without trial and error.

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 no additional meaning beyond this, such as format examples (e.g., integer ranges) or constraints (e.g., maximum list length). Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to heavily.

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 action ('Returns a list of objects') and resource ('information for each card ID provided'), making the purpose understandable. However, it doesn't differentiate this tool from potential siblings like 'note_notesInfo' or 'card_findCards', which might provide similar card-related information with different scopes or filters.

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. With siblings like 'card_findCards' (likely for searching cards) and 'note_notesInfo' (for note information), there's no indication of whether this tool is for bulk retrieval, specific metadata, or other use cases, leaving the agent to guess based on naming alone.

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