Skip to main content
Glama

set_cards_due_date

Schedule or reschedule Anki cards by setting their due dates. Input card IDs and specify the number of days from today, including negative values for past dates, to organize study timelines effectively.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardIdsYesArray of card IDs to set due date for
daysYesNumber of days from today (can be negative for past dates)

Implementation Reference

  • Handler function that implements the 'set_cards_due_date' tool logic by calling ankiClient.card.setDueDate({ cards: cardIds, days }) and returning a success message or error.
    async ({ cardIds, days }) => { try { const result = await ankiClient.card.setDueDate({ cards: cardIds, days }); return { content: [ { type: 'text', text: `Successfully set due date for cards. Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to set due date for cards: ${error instanceof Error ? error.message : String(error)}` ); } }
  • Input schema for the 'set_cards_due_date' tool using Zod: cardIds (array of numbers) and days (string).
    { cardIds: z.array(z.number()).describe('Array of card IDs to set due date for'), days: z.string().describe('Number of days from today (can be negative for past dates)'), },
  • Registration of the 'set_cards_due_date' tool via server.tool() call within registerCardTools function.
    server.tool( 'set_cards_due_date', { cardIds: z.array(z.number()).describe('Array of card IDs to set due date for'), days: z.string().describe('Number of days from today (can be negative for past dates)'), }, async ({ cardIds, days }) => { try { const result = await ankiClient.card.setDueDate({ cards: cardIds, days }); return { content: [ { type: 'text', text: `Successfully set due date for cards. Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to set due date for cards: ${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