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

decks.delete

decks_delete
Destructive

Delete Anki decks and their cards after explicit confirmation, including child decks and cleanup of resulting cardless notes.

Instructions

Delete decks and their cards with explicit acknowledgement.

Includes native child-deck deletion and removal of resulting cardless notes; deleting Default follows native behavior.

Anki-Connect method decks.delete. Scope: collection. Effect: write. Completion: completed. Undo: perItem.

Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, invalidState, 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": {
      "decks": "<decks>",
      "deleteCards": "<deleteCards>"
    },
    "name": "decks_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
decksYesDecks, each 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.
deleteCardsYesMust be true: confirms that the decks' cards are deleted as well.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description goes well beyond them: it discloses that cards and child decks are removed, that resulting cardless notes are cleaned up, how Default behaves, that undo is perItem, and it enumerates the exact error surface (staleSession, notFound, invalidState, etc.). That is exactly the operational context needed for an irreversible mutation.

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 destructive action and its cascade effects, then structured metadata (method, scope, effect, completion, undo) and a compact error list. Every line carries signal, though the inline metadata block reads densely and could be tightened slightly.

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?

With no output schema, the description supplies the missing pieces itself: completion state, undo granularity, error taxonomy, and the cascade/note-cleanup side effects. An agent has everything required to invoke this destructive tool safely.

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%, so the three parameters are already documented, including the id-vs-name oneOf form and the staleSession rationale for the session token. The description's phrase "explicit acknowledgement" adds only a light gloss on deleteCards that the schema already states verbatim, so baseline 3 is appropriate.

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?

The first line states a specific verb and resource ("Delete decks and their cards") plus the cascade semantics (child decks, resulting cardless notes). It is clearly distinguishable from siblings like decks_update, decks_create, and notes_delete, and the Default-deck caveat adds scope precision.

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

Usage Guidelines4/5

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

The description conveys when this applies (destructive deck removal, including native child-deck cascade) and hints at the acknowledgement requirement, but never routes the agent to alternatives such as decks_update for renaming or notes_delete for removing cards without deleting the deck. Clear context, no explicit exclusions.

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