reviews.getLatestId
reviews_getLatestIdReturns the history ID for the last review matching an optional deck or card filter, or null if none matches. Use it to locate the target review record for history queries.
Instructions
Return the latest matching history ID or null.
Anki-Connect method reviews.getLatestId. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "reviews_getLatestId"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deck | No | Only reviews of cards in this deck: exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}. Mutually exclusive with `cardIds`. | |
| cardIds | No | Only reviews of these cards (decimal string, e.g. "1700000000001"). Mutually exclusive with `deck`. | |
| session | No | Optional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from. | |
| membership | No | How `deck` is matched for cards in filtered decks: `current` = the deck the card is in now, `home` = its original (home) deck. Default `current`. | current |