get_reviews_of_cards
Retrieve review data for specified Anki cards using card IDs. Use this tool to analyze and manage study progress efficiently.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardIds | Yes | Array of card IDs to get reviews for |
Implementation Reference
- src/tools/statistic.ts:136-162 (registration)Full registration of the MCP tool 'get_reviews_of_cards', including schema, handler logic that fetches reviews via ankiClient.statistic.getReviewsOfCards, and response formatting.server.tool( 'get_reviews_of_cards', { cardIds: z.array(z.string()).describe('Array of card IDs to get reviews for'), }, async ({ cardIds }) => { try { const reviews = await ankiClient.statistic.getReviewsOfCards({ cards: cardIds }); return { content: [ { type: 'text', text: `Reviews retrieved for ${cardIds.length} cards`, }, { type: 'text', text: JSON.stringify(reviews, null, 2), }, ], }; } catch (error) { throw new Error( `Failed to get reviews for cards: ${error instanceof Error ? error.message : String(error)}` ); } } );
- src/tools/statistic.ts:141-161 (handler)The core handler function executing the tool logic: fetches reviews for given card IDs and returns a structured MCP response.async ({ cardIds }) => { try { const reviews = await ankiClient.statistic.getReviewsOfCards({ cards: cardIds }); return { content: [ { type: 'text', text: `Reviews retrieved for ${cardIds.length} cards`, }, { type: 'text', text: JSON.stringify(reviews, null, 2), }, ], }; } catch (error) { throw new Error( `Failed to get reviews for cards: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/statistic.ts:138-140 (schema)Zod input schema defining the 'cardIds' parameter as an array of strings.{ cardIds: z.array(z.string()).describe('Array of card IDs to get reviews for'), },