Skip to main content
Glama

Delete deck and cards

delete-deck-and-cards
DestructiveIdempotent

Preview and apply deletion of a normal Anki deck and all its descendant decks and Cards using a dry-run impact preview, confirmation flag, and impact hash to guard against accidental loss.

Instructions

Previews deletion of one normal deck and all descendants. Applying requires dryRun: false, the reviewed impactHash as expectedImpactHash, and confirmDeletion: true. Changed deck identities, Card placement, or Note data block deletion. Default/filtered decks, borrowed-out Cards, incomplete data, and excessive impact are blocked. Surviving sibling Cards in other decks are preserved and verified. No backup or rollback is created.

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": {
      "name": "<name>"
    },
    "name": "delete-deck-and-cards"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesExact root deck name; its descendants are included in deletion
dryRunNo
confirmDeletionNoMust be true after user approval when applying destructive deck/Card loss
expectedImpactHashNoimpactHash from a complete reviewed preview; required when applying

Output Schema

NameRequiredDescriptionDefault
deckYes
dryRunYes
existsYes
impactYes
appliedYes
blockersYes
verifiedYes
warningsYes
impactHashYes
deletedDeckYes
profileNameYes
deletedCardsYes
deletedDecksYes
impactCompleteYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered structurally. The description still adds meaningful behavior beyond that: no backup or rollback exists, changed deck identities or Card/Note data block the operation, borrowed-out and default decks are refused, and surviving sibling Cards are verified afterwards.

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?

Five short sentences, front-loaded with scope, then apply preconditions, then blocking conditions, then postconditions. No filler and no repetition of annotation-declared traits.

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?

Output schema exists, so return values need not be described. For a destructive, hash-gated operation the description covers preconditions, blockers, and data-survival guarantees; the only minor gap is that the preview response format is assumed rather than sketched.

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 coverage is 75% and the schema already documents expectedImpactHash and confirmDeletion. The description adds the coupling rule that the hash must come from a complete reviewed preview and that confirmDeletion is only set after user approval, which is workflow meaning beyond the field text.

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 plus exact scope: 'one normal deck and all descendants', and qualifies 'normal' so default/filtered decks are excluded. An agent can tell this apart from delete-notes-and-cards or delete-deck-preset from the text alone.

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?

Makes the two-phase workflow explicit: default is preview, and applying requires dryRun: false plus the reviewed expectedImpactHash and confirmDeletion: true. It also enumerates blocking conditions, but it never names a sibling alternative for deleting notes/cards only, so it stops short of full alternative routing.

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