Skip to main content
Glama

Check and repair the active Anki database

check-collection-integrity
Destructive

Preview or confirm Anki's native Check Database operation to repair collection data and clear Undo history; preview reviews the proposal without running the check.

Instructions

Preview or explicitly confirm Anki's native Check Database operation. It can repair data and clear the Undo history; the preview does not check the database. Requires AnkiConnect v1.

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": "check-collection-integrity"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoReview the active profile and proposal without running the operation.
confirmNoSet true only after the user approves the reviewed collection operation.
confirmationTokenNoShort-lived, one-use token returned by this tool's preview.

Output Schema

NameRequiredDescriptionDefault
stateYes
methodYes
profileYes
warningsYes
operationIdYes
includeMediaYesRequested media option for sync; null for other operations.
expiresInSecondsYes
confirmationTokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and non-idempotent, but the description adds genuinely new behavior: the operation can repair data, it clears the Undo history, and the preview does not actually check the database. The AnkiConnect v1 requirement is also a concrete dependency caveat. This is above the annotation baseline in exactly the way that matters for a destructive tool.

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

Conciseness5/5

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

Three short sentences, front-loaded with the operation, then the destructive consequence, then the version prerequisite — no filler. The caveat about preview not checking the database is placed immediately after the consequence it qualifies, which is the right ordering for a reader deciding whether to call it.

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

Completeness4/5

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

An output schema is present, so return values need no explanation, and the description covers both modes, the destructive side effect, and the version requirement. What is missing is the ordering obligation (whether confirm requires a token from a prior preview) and any recovery guidance after the Undo history is cleared, which matter for a destructive operation.

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?

With 100% schema description coverage, the schema already explains dryRun, confirm, and the confirmationToken contract thoroughly. The description only echoes the preview/confirm dichotomy in prose and adds no format, sequencing, or token-lifetime detail beyond what the parameters document, so the baseline 3 applies.

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?

States a specific verb and resource ("Anki's native Check Database operation") and decomposes it into its two modes, preview vs. explicit confirm. It does not name a sibling, so an agent must still infer from names like refresh-collection or get-collection-info that this is the integrity-repair path, but the operation itself is unambiguous.

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?

The two-stage flow (preview, then explicitly confirm) is implied by "Preview or explicitly confirm" and reinforced by the schema's confirm/token descriptions. However, it never states when to reach for this tool rather than refresh-collection, get-collection-info, or undo-collection-action, and it does not say whether preview is mandatory before confirm.

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