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

collection.checkIntegrity

collection_checkIntegrity

Run Anki database integrity checks and repairs with normal UI completion, waiting for the final result by default.

Instructions

Run Anki database checks and repairs with normal UI completion.

Anki-Connect method collection.checkIntegrity. Scope: collection. Effect: write. Completion: operation. Undo: clears.

Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).

Possible errors: cancelled, collectionUnavailable, editorConflict, internalError, invalidParams, 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": "collection_checkIntegrity"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.
timeoutSecondsNoMCP option (not sent to Anki): how long to wait for completion. A timeout does not cancel the work; the pending record is returned.
waitForCompletionNoMCP option (not sent to Anki): poll operations.get until the operation finishes and return its final record. If false, return the operation handle.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The description adds real behavioral content beyond the annotations: effect=write, "Undo: clears" (the undo stack is invalidated), the blocking/polling model, and the fact that a timeout does not cancel the work. It also enumerates the failure modes (cancelled, collectionUnavailable, editorConflict, staleSession), which is more than the annotations convey. It stops short of saying what the repair actually mutates or whether it is recoverable, and "normal UI completion" is opaque jargon.

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?

Front-loaded with the action in the first clause, then compressed into short labeled tags — easy to scan. Minor waste: the long-running sentence largely restates what the timeoutSeconds schema text already says.

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?

For a zero-required-parameter, long-running write operation it covers completion model, undo impact, and error surface, which is solid. However, with no output schema the description never indicates what comes back (e.g., a report of found/repaired problems versus a bare success flag), and it never says how risky repair is or whether existing data can be lost — the main thing an agent needs before invoking it.

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%, so all three parameters (session, timeoutSeconds, waitForCompletion) are fully documented in the schema, including the non-obvious detail that timeout does not cancel the operation. The description only points at waitForCompletion/timeoutSeconds without adding format or default information, so baseline 3 applies.

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

Purpose5/5

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

"Run Anki database checks and repairs" gives a specific verb pair (check/repair) against a specific resource (the Anki collection database), which is enough to separate it from the other collection-scoped siblings (collection_sync, collection_refresh, collection_undo). The appended scope/effect tags reinforce that this is a collection-wide maintenance operation rather than a per-record edit.

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

Usage Guidelines3/5

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

Usage is implied by the verb (reach for this when integrity checking/repair is needed) and by the long-running note that explains the default blocking behavior, but there is no explicit when-to-use versus when-not guidance and no mention of the obvious alternatives (collection_sync, collection_refresh) or of prerequisites such as taking a backup before repair.

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