Skip to main content
Glama
anki-connect-mcp
by SolarianGG

decks.getCounts

decks_getCounts
Read-only

Retrieve 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

NameRequiredDescriptionDefault
deckYesDeck: exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}.
sessionNoOptional. 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.
includeChildrenNoInclude subdecks of `deck`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuine context beyond that: collection scope, completion semantics, undo=none, and an explicit error enumeration including staleSession, which tells the agent how session mismatches surface.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is short and front-loads the core purpose, then moves to scope/effect/error metadata. Slight redundancy with annotations ("Effect: read", "Undo: none") costs little but is not purely additive information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should clarify what a 'native due-tree count' actually returns (per-subdeck counts? new/learn/review breakdown?), which it only gestures at. For a read tool with fully documented parameters and annotations, this is adequate but leaves the response shape underspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, including the oneOf deck-by-id-or-name discriminator and the session parameter's purpose, so the schema carries the parameter burden. The description adds nothing about deck, session, or includeChildren beyond what is already structured, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Get native due-tree counts and total cards" gives a specific verb (get) and resource (deck counts) that clearly differs from decks_list, decks_get, and decks_update. It does not explicitly name those siblings, so the differentiation is inferable rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to prefer this over decks_list, decks_get, or statistics_getSummary, nor any mention of prerequisites or exclusions. The agent must infer usage from the tool name and schema alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools