Skip to main content
Glama

getReviewQueue

Retrieve Anki flashcards due for review with options to filter by deck, card type, and quantity.

Instructions

Get cards due for review with filtering options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deckIdNoOptional deck ID to filter cards
includeLearningNoInclude learning cards
includeNewNoInclude new cards
includeReviewNoInclude review cards
limitNoMaximum number of cards to return

Implementation Reference

  • The handler function for the getReviewQueue tool. It constructs query parameters from input args and makes a GET request to the Anki API endpoint '/api/v1/study/queue' to fetch cards due for review, returning the JSON response or an error message.
    execute: async args => { try { const queryParams: Record<string, boolean | number | string> = {}; if (args.deckId !== undefined) queryParams.deckId = args.deckId; if (args.includeLearning !== undefined) queryParams.includeLearning = args.includeLearning; if (args.includeNew !== undefined) queryParams.includeNew = args.includeNew; if (args.includeReview !== undefined) queryParams.includeReview = args.includeReview; if (args.limit !== undefined) queryParams.limit = args.limit; const data = await ankiApiRequest( 'GET', '/api/v1/study/queue', undefined, queryParams, ); return JSON.stringify(data, null, 2); } catch (error) { return `Error: ${error instanceof Error ? error.message : String(error)}`; } },
  • Zod schema defining the optional input parameters for the getReviewQueue tool: deckId, includeLearning, includeNew, includeReview, and limit.
    parameters: z.object({ deckId: z.string().optional().describe('Optional deck ID to filter cards'), includeLearning: z.boolean().optional().describe('Include learning cards'), includeNew: z.boolean().optional().describe('Include new cards'), includeReview: z.boolean().optional().describe('Include review cards'), limit: z.number().optional().describe('Maximum number of cards to return'), }),
  • src/index.ts:224-257 (registration)
    The server.addTool call that registers the getReviewQueue tool, including its name, description, handler, and parameters schema.
    server.addTool({ description: 'Get cards due for review with filtering options', execute: async args => { try { const queryParams: Record<string, boolean | number | string> = {}; if (args.deckId !== undefined) queryParams.deckId = args.deckId; if (args.includeLearning !== undefined) queryParams.includeLearning = args.includeLearning; if (args.includeNew !== undefined) queryParams.includeNew = args.includeNew; if (args.includeReview !== undefined) queryParams.includeReview = args.includeReview; if (args.limit !== undefined) queryParams.limit = args.limit; const data = await ankiApiRequest( 'GET', '/api/v1/study/queue', undefined, queryParams, ); return JSON.stringify(data, null, 2); } catch (error) { return `Error: ${error instanceof Error ? error.message : String(error)}`; } }, name: 'getReviewQueue', parameters: z.object({ deckId: z.string().optional().describe('Optional deck ID to filter cards'), includeLearning: z.boolean().optional().describe('Include learning cards'), includeNew: z.boolean().optional().describe('Include new cards'), includeReview: z.boolean().optional().describe('Include review cards'), limit: z.number().optional().describe('Maximum number of cards to return'), }), });

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

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