get_cards_ease_factors
Retrieve ease factors for specific Anki flashcards by providing their card IDs, enabling users to analyze and optimize their spaced repetition learning process.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardIds | Yes | Array of card IDs to get ease factors for |
Implementation Reference
- src/tools/cards.ts:312-339 (handler)Complete MCP tool registration for 'get_cards_ease_factors', including input schema and the handler function that fetches ease factors via ankiClient and returns formatted results.server.tool( 'get_cards_ease_factors', { cardIds: z.array(z.number()).describe('Array of card IDs to get ease factors for'), }, async ({ cardIds }) => { try { const easeFactors = await ankiClient.card.getEaseFactors({ cards: cardIds }); const result = cardIds.map((cardId, index) => ({ cardId, easeFactor: easeFactors[index], })); return { content: [ { type: 'text', text: `Ease factors: ${JSON.stringify(result, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get ease factors: ${error instanceof Error ? error.message : String(error)}` ); } } );