card_cardsModTime
Retrieve modification timestamps for specific Anki flashcards to track recent changes or updates in your study materials.
Instructions
Returns modification time for each card ID provided. Result is a list of objects with 'cardId' and 'modTime' (timestamp).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cards | Yes | A list of card IDs. |
Implementation Reference
- src/anki_mcp/card_service.py:53-60 (handler)The handler function implementing the 'card_cardsModTime' tool (prefixed from 'cardsModTime'). It takes a list of card IDs and returns their modification times by calling the AnkiConnect 'cardsModTime' API.@card_mcp.tool( name="cardsModTime", description="Returns modification time for each card ID provided. Result is a list of objects with 'cardId' and 'modTime' (timestamp).", ) async def get_cards_modification_time_tool( cards: Annotated[List[int], Field(description="A list of card IDs.")], ) -> List[Dict[str, Any]]: return await anki_call("cardsModTime", cards=cards)
- src/anki_mcp/__init__.py:25-25 (registration)Registers the card_mcp service with prefix 'card_', making the tool available as 'card_cardsModTime' under the main AnkiMCP server.await anki_mcp.import_server("card", card_mcp)
- src/anki_mcp/card_service.py:57-60 (schema)Input schema: list of integers (card IDs). Output: list of dicts with 'cardId' and 'modTime'.async def get_cards_modification_time_tool( cards: Annotated[List[int], Field(description="A list of card IDs.")], ) -> List[Dict[str, Any]]: return await anki_call("cardsModTime", cards=cards)
- src/anki_mcp/card_service.py:6-7 (helper)Imports the helper function anki_call used to proxy requests to AnkiConnect API.from .common import anki_call