Skip to main content
Glama

insert_reviews

Add review data to Anki MCP by inserting arrays of review tuples, each containing timestamp, card ID, intervals, and review details for accurate tracking and analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reviewsYesArray of review tuples to insert

Implementation Reference

  • The handler function for the 'insert_reviews' MCP tool. It takes an array of review tuples and inserts them into Anki via ankiClient.statistic.insertReviews, returning a success message.
    async ({ reviews }) => { try { await ankiClient.statistic.insertReviews({ reviews }); return { content: [ { type: 'text', text: `Successfully inserted ${reviews.length} reviews into the database`, }, ], }; } catch (error) { throw new Error( `Failed to insert reviews: ${error instanceof Error ? error.message : String(error)}` ); } }
  • Input schema for the 'insert_reviews' tool using Zod. Defines 'reviews' as an array of 9-tuple numbers representing review data.
    { reviews: z .array( z.tuple([ z.number().describe('Review time (unix timestamp)'), z.number().describe('Card ID'), z.number().describe('USN'), z.number().describe('Button pressed'), z.number().describe('New interval'), z.number().describe('Previous interval'), z.number().describe('New factor'), z.number().describe('Review duration'), z.number().describe('Review type'), ]) ) .describe('Array of review tuples to insert'),
  • Registration of the 'insert_reviews' MCP tool using server.tool(), including the tool name, input schema, and handler function.
    server.tool( 'insert_reviews', { reviews: z .array( z.tuple([ z.number().describe('Review time (unix timestamp)'), z.number().describe('Card ID'), z.number().describe('USN'), z.number().describe('Button pressed'), z.number().describe('New interval'), z.number().describe('Previous interval'), z.number().describe('New factor'), z.number().describe('Review duration'), z.number().describe('Review type'), ]) ) .describe('Array of review tuples to insert'), }, async ({ reviews }) => { try { await ankiClient.statistic.insertReviews({ reviews }); return { content: [ { type: 'text', text: `Successfully inserted ${reviews.length} reviews into the database`, }, ], }; } catch (error) { throw new Error( `Failed to insert reviews: ${error instanceof Error ? error.message : String(error)}` ); } } );

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