Skip to main content
Glama

Delete a deck

delete_deck
DestructiveIdempotent

Delete an AnkiWeb deck with its subdecks and every card, permanently across synced devices. Preview the removal first, then confirm to delete by deck id; nothing is removed without confirmation.

Instructions

Delete one of the signed-in user's decks, with its subdecks and every card in them, from their AnkiWeb collection. The deletion reaches every device on its next sync and cannot be undone.

Without confirm, nothing is deleted: the call finds the deck and returns a preview of what goes. Show that preview to the user and wait for their explicit go-ahead before calling again with confirm: true.

The confirmed call must name the deck by its numeric id, as the preview gives it, never by name.

With more than one AnkiWeb account stored, the preview names the one the deck belongs to, and the confirmed call must name it in account.

Needs an AnkiWeb session.

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": "delete_deck"
  }
}

Input Schema

NameRequiredDescriptionDefault
deckYesThe deck's id or its exact full name, as list_my_decks gives them. A confirmed call takes the id only.
accountNoOmit unless the user names an AnkiWeb account. Which of the accounts signed in on this machine to act as; a name that is not one is refused with the list.
confirmNotrue deletes. Only after the user has seen the preview and agreed.

Output Schema

NameRequiredDescriptionDefault
deckYes
statusYes
accountNoThe account the deck belongs to, given when more than one is stored.
listingsYesShared listings of the deck or its subdecks. They stay on AnkiWeb after the deck is deleted; unshare_deck removes them.
subdecksYesDeleted along with the deck.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.5

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: deletion propagates to every device on its next sync, is irreversible, requires an AnkiWeb session, and behaves as a non-destructive preview unless confirmed. The dry-run-then-confirm semantics are exactly the kind of behavior annotations (destructiveHint=true, idempotentHint=true) cannot express on their own.

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?

Front-loads what gets destroyed before the workflow, then the two-step safety protocol, then the parameter constraints. Each sentence adds a distinct operational rule; nothing is redundant with 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?

For a destructive, session-dependent mutation with an output schema covering the preview payload, the description supplies everything an agent needs: safety gating, id-vs-name rule, account selection, and irreversibility. No material gap remains.

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

Parameters4/5

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

Schema covers 100% of parameters, so the baseline is 3, but the description adds real meaning: `deck` must be the numeric id (not the name) on a confirmed call, and `account` is required only when the preview reports multiple stored accounts. It does not restate the `confirm` default, but the schema already carries that.

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?

Opens with a specific verb and resource ('Delete one of the signed-in user's decks') and immediately defines blast radius ('with its subdecks and every card in them, from their AnkiWeb collection'). No sibling tool deletes a deck, so this is trivially distinguishable from convert_deck_to_markdown, share_deck, and the list/search siblings.

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 states the when and how-not: without `confirm` nothing is deleted and only a preview returns; the user must see it and give go-ahead before calling again with `confirm: true`. It also gives the alternative-form rule ('never by name' on the confirmed call) and the conditional account path when multiple accounts are stored.

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