gui_current_card
Retrieve and display the current active flashcard in Anki MCP, enabling users to view ongoing study material directly within the interface.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/graphical.ts:131-150 (handler)MCP tool registration and handler for 'gui_current_card'. Calls AnkiConnect's guiCurrentCard via ankiClient to fetch current card info during review and returns it as text content.// Tool: Get information about the current card server.tool('gui_current_card', {}, async () => { try { const cardInfo = await ankiClient.graphical.guiCurrentCard(); return { content: [ { type: 'text', text: cardInfo ? `Current card: ${JSON.stringify(cardInfo, null, 2)}` : 'No card is currently being reviewed', }, ], }; } catch (error) { throw new Error( `Failed to get current card: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/graphical.ts:131-150 (registration)Registers the 'gui_current_card' tool with empty input schema and the handler function in registerGraphicalTools.// Tool: Get information about the current card server.tool('gui_current_card', {}, async () => { try { const cardInfo = await ankiClient.graphical.guiCurrentCard(); return { content: [ { type: 'text', text: cardInfo ? `Current card: ${JSON.stringify(cardInfo, null, 2)}` : 'No card is currently being reviewed', }, ], }; } catch (error) { throw new Error( `Failed to get current card: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/miscellaneous.ts:264-264 (helper)References 'guiCurrentCard' AnkiConnect action in the 'multi' tool's action enum for batch operations.'guiCurrentCard',