Skip to main content
Glama

get-cards-reviewed

Track daily card review progress using the Anki MCP Server tool. Retrieve detailed insights into the number of cards reviewed per day to monitor learning and retention effectively.

Instructions

Get the number of cards reviewed by day

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the 'get-cards-reviewed' tool. It fetches daily card review counts from Anki via make_anki_request, formats them into readable text, and returns as TextContent.
    async def get_cards_reviewed() -> list[types.TextContent]:
        result = await make_anki_request("getNumCardsReviewedByDay")
        
        if result["success"]:
            review_data = result["result"]
            # Format the review data for better readability
            formatted_data = "\n".join([f"{day}: {count} cards" for day, count in review_data])
            
            return [
                types.TextContent(
                    type="text",
                    text=f"Cards reviewed by day:\n{formatted_data}",
                )
            ]
        else:
            return [
                types.TextContent(
                    type="text",
                    text=f"Failed to retrieve review statistics: {result['error']}",
                )
            ]
  • Registers the 'get-cards-reviewed' tool with the FastMCP app instance, associating it with the get_cards_reviewed handler.
    app.tool(name="get-cards-reviewed", description="Get the number of cards reviewed by day")(get_cards_reviewed)
  • Utility function used by the handler to send HTTP requests to Anki Connect API and handle responses/errors.
    async def make_anki_request(action: str, **params) -> Dict[str, Any]:
        """Make a request to the Anki Connect API with proper error handling."""
        request_data = {
            "action": action,
            "version": ANKI_CONNECT_VERSION
        }
        
        if params:
            request_data["params"] = params
        
        async with httpx.AsyncClient() as client:
            try:
                response = await client.post(ANKI_CONNECT_URL, json=request_data, timeout=30.0)
                response.raise_for_status()
                result = response.json()
                
                # Anki Connect returns an object with either a result or error field
                if "error" in result and result["error"]:
                    return {"success": False, "error": result["error"]}
                
                return {"success": True, "result": result.get("result")}
            except Exception as e:
                return {"success": False, "error": str(e)}
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 of behavioral disclosure. It states the tool retrieves aggregated data ('number of cards reviewed by day'), implying a read-only operation, but doesn't specify behavioral traits like whether it requires authentication, has rate limits, returns historical data only, or handles errors. For a tool with zero annotation coverage, this is a significant gap in transparency.

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: 'Get the number of cards reviewed by day'. It is front-loaded with the core purpose, has zero waste, and is appropriately sized for a simple tool with no parameters. Every word earns its place by specifying the action, resource, and temporal aspect.

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 complexity (simple retrieval with 0 parameters), no annotations, and no output schema, the description is minimally adequate. It states what the tool does but lacks context on usage, behavioral traits, or return values. Without an output schema, the description doesn't explain what data is returned (e.g., format, date range), leaving gaps for the agent to infer.

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?

The input schema has 0 parameters with 100% description coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, but since there are no parameters, this is acceptable. The baseline for 0 parameters is 4, as the description needn't compensate for missing parameter documentation.

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 tool's purpose: 'Get the number of cards reviewed by day' specifies the verb (get), resource (cards reviewed), and temporal scope (by day). It distinguishes from sibling tools like 'add-or-update-notes' or 'find-notes' by focusing on aggregated review metrics rather than note manipulation or search. However, it doesn't explicitly differentiate from 'get-collection-overview', which might also provide statistical data.

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, such as whether user authentication or specific data access is required, nor does it compare to sibling tools like 'get-collection-overview' that might offer overlapping functionality. Usage is implied through the purpose statement alone, leaving the agent to infer context.

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

Related 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/johwiebe/anki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server