Skip to main content
Glama

get_cards_mod_time

Retrieve the modification timestamps for specified card IDs in Anki MCP. Use this tool to track changes and manage card updates efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardIdsYesArray of card IDs to get modification time for

Implementation Reference

  • Registers the 'get_cards_mod_time' tool with the MCP server, including inline schema and handler.
    // Tool: Get modification time for cards server.tool( 'get_cards_mod_time', { cardIds: z.array(z.number()).describe('Array of card IDs to get modification time for'), }, async ({ cardIds }) => { try { const modTimes = await ankiClient.card.cardsModTime({ cards: cardIds }); return { content: [ { type: 'text', text: `Modification times: ${JSON.stringify(modTimes, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get modification times: ${error instanceof Error ? error.message : String(error)}` ); } } );
  • Handler function executes the tool: fetches modification times via ankiClient.card.cardsModTime and returns formatted text response.
    async ({ cardIds }) => { try { const modTimes = await ankiClient.card.cardsModTime({ cards: cardIds }); return { content: [ { type: 'text', text: `Modification times: ${JSON.stringify(modTimes, null, 2)}`, }, ], }; } catch (error) { throw new Error( `Failed to get modification times: ${error instanceof Error ? error.message : String(error)}` ); } }
  • Zod input schema for the tool: requires 'cardIds' as an array of numbers.
    { cardIds: z.array(z.number()).describe('Array of card IDs to get modification time for'), },

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