Skip to main content
Glama

relearn_cards

Reset and relearn specific cards in Anki by providing their IDs, helping users efficiently revisit and retain spaced-repetition material.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardIdsYesArray of card IDs to relearn

Implementation Reference

  • Full registration of the 'relearn_cards' MCP tool, including input schema validation and the handler function that executes ankiClient.card.relearnCards to set cards to relearn status.
    server.tool( 'relearn_cards', { cardIds: z.array(z.number()).describe('Array of card IDs to relearn'), }, async ({ cardIds }) => { try { await ankiClient.card.relearnCards({ cards: cardIds }); return { content: [ { type: 'text', text: `Successfully set ${cardIds.length} cards to relearn`, }, ], }; } catch (error) { throw new Error( `Failed to relearn cards: ${error instanceof Error ? error.message : String(error)}` ); } } );
  • Handler function for 'relearn_cards' tool: takes array of cardIds, calls ankiClient.card.relearnCards, returns success message or throws error.
    async ({ cardIds }) => { try { await ankiClient.card.relearnCards({ cards: cardIds }); return { content: [ { type: 'text', text: `Successfully set ${cardIds.length} cards to relearn`, }, ], }; } catch (error) { throw new Error( `Failed to relearn cards: ${error instanceof Error ? error.message : String(error)}` ); } } );
  • Input schema for 'relearn_cards' tool: requires array of numeric card IDs.
    { cardIds: z.array(z.number()).describe('Array of card IDs to relearn'), },

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

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