forget_cards
Mark specific Anki cards as forgotten to reset their learning progress. Use this tool to restart their review cycle, ensuring better retention and mastery.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardIds | Yes | Array of card IDs to forget |
Implementation Reference
- src/tools/cards.ts:241-257 (handler)The handler function for the 'forget_cards' tool. It receives an array of card IDs, calls the Anki client's forgetCards method, returns a success message if successful, or throws an error.async ({ cardIds }) => { try { await ankiClient.card.forgetCards({ cards: cardIds }); return { content: [ { type: 'text', text: `Successfully forgot ${cardIds.length} cards, making them new again`, }, ], }; } catch (error) { throw new Error( `Failed to forget cards: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/cards.ts:238-240 (schema)Zod input schema for the 'forget_cards' tool defining the required 'cardIds' parameter as an array of numbers.{ cardIds: z.array(z.number()).describe('Array of card IDs to forget'), },
- src/tools/cards.ts:236-258 (registration)MCP tool registration for 'forget_cards' using server.tool(), including schema and handler implementation.server.tool( 'forget_cards', { cardIds: z.array(z.number()).describe('Array of card IDs to forget'), }, async ({ cardIds }) => { try { await ankiClient.card.forgetCards({ cards: cardIds }); return { content: [ { type: 'text', text: `Successfully forgot ${cardIds.length} cards, making them new again`, }, ], }; } catch (error) { throw new Error( `Failed to forget cards: ${error instanceof Error ? error.message : String(error)}` ); } } );