Skip to main content
Glama

Request cancellation of an Anki collection operation

cancel-collection-operation
Destructive

Request cancellation of a running Anki sync, database check, or Undo by operation ID. Check status afterward; acknowledgement does not confirm completion or rollback.

Instructions

When the user asks to stop a sync, database check, or Undo, request cancellation of its operation ID from this running MCP server. Anki may refuse to stop a running operation. Acknowledgement is not completion or rollback; check get-collection-operation. Requires AnkiConnect v1.

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": {
      "operationId": "<operationId>"
    },
    "name": "cancel-collection-operation"
  }
}

Input Schema

NameRequiredDescriptionDefault
operationIdYesOperation ID returned by a collection tool on this MCP server.

Output Schema

NameRequiredDescriptionDefault
methodYes
profileYes
requestedYesWhether Anki acknowledged the cancellation request, not whether it stopped.
operationIdYesOperation ID returned by a collection tool on this MCP server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive=true, idempotent=false, so the safety bar is partly met; the description adds substantially more. It discloses that Anki may refuse to stop the operation, that acknowledgement is neither completion nor rollback, and that AnkiConnect v1 is required — three behavioral facts an agent cannot infer from structured fields.

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?

Four short sentences, front-loaded with the trigger condition, then the caveat, then the verification path, then the version requirement. No filler and no repetition of the schema or annotations.

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

Completeness5/5

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

Output schema exists, so return values need no explanation, and annotations cover the safety profile. The description fills the remaining gaps an agent needs — best-effort cancellation semantics, async confirmation behavior, and the version prerequisite — for a one-parameter tool.

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 coverage is 100% and the single operationId parameter is already documented as the ID returned by a collection tool. The description only adds the scoping nuance that the ID belongs to 'this running MCP server,' which hints at non-portability but is not elaborated. Baseline 3 is appropriate when the schema carries the parameter meaning.

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?

States a specific verb and resource: 'request cancellation of its operation ID' for a running operation on this MCP server. The trigger clause ('stop a sync, database check, or Undo') makes the resource scope concrete, and the mention of get-collection-operation separates it from the status-reading sibling.

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

Usage Guidelines5/5

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

Explicitly names the when: the user asks to stop a sync, database check, or Undo. It also names the follow-up alternative for verification ('check get-collection-operation'), so an agent knows both the entry condition and where to go afterwards rather than re-calling cancel.

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