gui_answer_card
Submit ease ratings (1-4) for Anki cards to manage learning progress and optimize review intervals using the Anki MCP server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ease | Yes | Ease rating: 1 (Again), 2 (Hard), 3 (Good), 4 (Easy) |
Implementation Reference
- src/tools/graphical.ts:47-73 (registration)Full registration of the 'gui_answer_card' MCP tool, including name, input schema, and execution handler.server.tool( 'gui_answer_card', { ease: z .number() .min(1) .max(4) .describe('Ease rating: 1 (Again), 2 (Hard), 3 (Good), 4 (Easy)'), }, async ({ ease }) => { try { const result = await ankiClient.graphical.guiAnswerCard({ ease }); return { content: [ { type: 'text', text: `Successfully answered current card with ease ${ease}. Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to answer card: ${error instanceof Error ? error.message : String(error)}` ); } } );
- src/tools/graphical.ts:56-72 (handler)Handler that calls AnkiConnect's guiAnswerCard action with the ease parameter and returns a formatted text response.async ({ ease }) => { try { const result = await ankiClient.graphical.guiAnswerCard({ ease }); return { content: [ { type: 'text', text: `Successfully answered current card with ease ${ease}. Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to answer card: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/graphical.ts:49-55 (schema)Input schema using Zod to validate the 'ease' parameter (integer 1-4).{ ease: z .number() .min(1) .max(4) .describe('Ease rating: 1 (Again), 2 (Hard), 3 (Good), 4 (Easy)'), },