Skip to main content
Glama

Delete deck

delete_deck
Destructive

Use this when the user asks to permanently delete a whole deck, every subdeck under it and all their cards. The first call deletes nothing and returns decks_affected, the affected card IDs and count, and a confirm_token: name every affected deck, ask once, then repeat the same deck with the token. Tokens last ten minutes across reconnects; a changed card or subdeck needs a fresh confirmation. To keep the cards but stop studying them, use archive_deck.

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 full name, e.g. "Pharm::Cardio" (list_decks has the names).
confirm_tokenNoOmit on the first call; pass back the token the first call returned, after the user has confirmed.

Output Schema

NameRequiredDescriptionDefault
noteYes
deletedYes
pendingYes
card_idsYes
expires_msYes
deck_totalsYes
confirm_tokenNo
cards_affectedYes
decks_affectedYesA deck deletion: the decks that go, by name, the deck first and then the decks under it. Empty for a deletion of cards.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / required
      Previous value: -[
      -  "deleted",
      -  "pending",
      -  "cards_affected",
      -  "card_ids",
      -  "decks_affected",
      -  "deck_totals"
      -]New value: +[
      +  "deleted",
      +  "pending",
      +  "cards_affected",
      +  "card_ids",
      +  "decks_affected",
      +  "deck_totals",
      +  "expires_ms",
      +  "note"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / deck / description
      Previous value: -"Deck name."New value: +"The deck's full name, e.g. \"Pharm::Cardio\" (list_decks has the\nnames)."
  3. Changed2 schema fields changed
    • addedOutput schema / properties / decks_affected
      Added value: +{
      +  "description": "A deck deletion: the decks that go, by name, the deck first and\nthen the decks under it. Empty for a deletion of cards.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "deleted",
      -  "pending",
      -  "cards_affected",
      -  "card_ids",
      -  "deck_totals"
      -]New value: +[
      +  "deleted",
      +  "pending",
      +  "cards_affected",
      +  "card_ids",
      +  "decks_affected",
      +  "deck_totals"
      +]
  4. Changed7 schema fields changed
    • addedOutput schema / properties / card_ids
      Added value: +{
      +  "items": {
      +    "format": "int64",
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / cards_affected / description
      Removed value: -"Cards this deletion removes (removed, once `deleted` is true)."
    • addedOutput schema / properties / deck_totals
      Added value: +{
      +  "items": {
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "prefixItems": [
      +      {
      +        "format": "int64",
      +        "type": "integer"
      +      },
      +      {
      +        "format": "uint32",
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    ],
      +    "type": "array"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / deleted / description
      Removed value: -"True only after a confirmed call removed the target."
    • addedOutput schema / properties / expires_ms
      Added value: +{
      +  "format": "int64",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / pending / description
      Removed value: -"True when this call recorded the request and is waiting for the\nperson's yes; `confirm_token` is set and nothing was removed."
    • changedOutput schema / required
      Previous value: -[
      -  "deleted",
      -  "pending",
      -  "cards_affected"
      -]New value: +[
      +  "deleted",
      +  "pending",
      +  "cards_affected",
      +  "card_ids",
      +  "deck_totals"
      +]
  5. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description's job is to add detail, which it does: the first call deletes nothing, it returns decks_affected, card IDs and count, and a confirm_token. It also discloses token lifetime (ten minutes, surviving reconnects) and invalidation on a changed card or subdeck — real behavioral context an agent cannot get elsewhere.

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?

Two dense sentences, front-loaded with the trigger and scope, then the call protocol. The middle clause is telegraphic ('name every affected deck, ask once, then repeat the same deck with the token') and takes a re-read, but no sentence is filler.

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, two-phase mutation with an output schema, the description covers scope, the confirmation loop, token expiry and invalidation, and the safer alternative. Nothing an agent needs in order to call this correctly or safely is missing.

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 100% and the schema already says to omit confirm_token on the first call and pass back the returned token, so most of the description's parameter text is restatement. It does add value the schema lacks: the token's ten-minute TTL and the rule that a changed card or subdeck invalidates it and needs fresh confirmation.

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 (permanently delete) and resource (a whole deck, every subdeck under it, and all their cards), so the blast radius is unambiguous. It also names archive_deck as the non-destructive sibling, letting an agent distinguish it without opening any schema.

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?

Opens with an explicit trigger ('when the user asks to permanently delete a whole deck') and closes with an explicit when-not plus alternative ('To keep the cards but stop studying them, use archive_deck'). It even prescribes the interaction protocol: name every affected deck, ask once, then repeat the deck with the token.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.