get_num_cards_reviewed_today
Retrieve the number of Anki cards reviewed today to track daily progress and maintain consistent study habits.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/statistic.ts:117-133 (handler)The core handler function for the MCP tool 'get_num_cards_reviewed_today'. It has no input parameters (empty schema), invokes AnkiConnect's statistic.getNumCardsReviewedToday() method, and returns a formatted text response with the count of cards reviewed today.server.tool('get_num_cards_reviewed_today', {}, async () => { try { const reviewsToday = await ankiClient.statistic.getNumCardsReviewedToday(); return { content: [ { type: 'text', text: `Number of cards reviewed today: ${reviewsToday}`, }, ], }; } catch (error) { throw new Error( `Failed to get number of cards reviewed today: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/statistic.ts:117-133 (registration)Registration of the 'get_num_cards_reviewed_today' tool on the MCP server within the registerStatisticTools function.server.tool('get_num_cards_reviewed_today', {}, async () => { try { const reviewsToday = await ankiClient.statistic.getNumCardsReviewedToday(); return { content: [ { type: 'text', text: `Number of cards reviewed today: ${reviewsToday}`, }, ], }; } catch (error) { throw new Error( `Failed to get number of cards reviewed today: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/consolidated.ts:692-702 (helper)Usage of the underlying AnkiConnect statistic.getNumCardsReviewedToday() method within the consolidated 'get_analytics' tool's 'reviews_today' case.case 'reviews_today': { const count = await ankiClient.statistic.getNumCardsReviewedToday(); return { content: [ { type: 'text', text: `📊 Cards reviewed today: ${count}`, }, ], }; }