Skip to main content
Glama

Delete notes and cards

delete-notes-and-cards
DestructiveIdempotent

Preview deletion first, then permanently delete explicit Anki notes and all their generated cards using an approved impact hash; changed notes, tags, profile, or card IDs block the batch.

Instructions

Previews deletion of explicit Note IDs and all their generated Cards. Defaults to dryRun. Applying requires the reviewed impactHash as expectedImpactHash and confirmDeletion: true. Missing Notes or changed profile, Note content, tags, or Card IDs block the entire batch. Successful deletion is verified with native searches. 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": {
      "noteIds": "<noteIds>"
    },
    "name": "delete-notes-and-cards"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview Notes and generated Cards without deleting anything
noteIdsYesExplicit Note IDs; duplicates are ignored. Search queries are not accepted.
confirmDeletionNoMust be true when applying, after the user approves permanent Note/Card data loss
expectedImpactHashNoimpactHash returned by a complete preview; required when dryRun is false

Output Schema

NameRequiredDescriptionDefault
dryRunYes
impactYes
appliedYes
blockersYes
verifiedYes
warningsYes
impactHashYesNull if any requested Note is missing or could not be loaded; no partial batch is deleted
profileNameYes
deletedNotesYes
missingNoteIdsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive and idempotent, but the description adds genuinely new behavior: dry-run default, hash-gated apply, whole-batch abort on missing notes or changed profile/content/tags/Card IDs, post-deletion verification via native searches, and no backup or rollback. That is exactly the extra risk context an agent needs before a destructive call.

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-loads the preview-then-apply model and each subsequent sentence carries distinct safety information with no filler. It is dense and slightly telegraphic, but no sentence is wasted.

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, hash-verified batch operation the description covers prerequisites, failure conditions, verification, and irreversibility, and an output schema exists so return values need no explanation. Nothing essential to calling it correctly 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%, so baseline is 3; the description nonetheless explains the relationship between the preview's impactHash and expectedImpactHash and ties confirmDeletion to user approval of permanent data loss. Only noteIds' duplicate-ignoring behavior is left to the schema.

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 (deletion of explicit Note IDs plus their generated Cards) and pins the mode as a preview by default. The word 'explicit' plus the noteIds restriction distinguishes it from search-driven or deck-level deletion siblings without ambiguity.

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?

Gives the operational flow clearly: preview by default, then apply with the reviewed impactHash and confirmDeletion: true. It does not name a specific alternative tool (e.g., deck-level deletion) or state exclusions beyond rejecting search queries, so it stops short of full when/when-not routing.

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