decks.getCounts
decks_getCountsRetrieve due-tree counts and total card counts for a deck, optionally including its subdecks, by deck ID or full name. Use it to check how many cards are due before studying or scheduling.
Instructions
Get native due-tree counts and total cards.
Anki-Connect method decks.getCounts. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"deck": "<deck>"
},
"name": "decks_getCounts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deck | Yes | Deck: exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}. | |
| 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. | |
| includeChildren | No | Include subdecks of `deck`. |