Skip to main content
Glama

Delete unused Anki tags

delete-unused-tags
DestructiveIdempotent

Preview and remove unused tag registrations from the active Anki collection after confirming the reviewed preview. Cleans up orphaned tags without changing note tags or deleting notes and cards.

Instructions

Previews and removes tag registrations that no Note uses in the active collection. Does not remove tags from Notes or delete Notes or Cards. Requires AnkiConnect v1 and confirmation of the reviewed preview.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "delete-unused-tags"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview without modifying Anki.
confirmDeletionNoConfirm cleanup of unused tags across the active collection.
expectedImpactHashNoHash from the reviewed tag cleanup preview.

Output Schema

NameRequiredDescriptionDefault
dryRunYes
appliedYes
profileYes
blockersYes
verifiedYes
warningsYes
impactHashYes
unusedTagsYes
deletedCountYes
registeredTagCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint/readOnlyHint annotations, it discloses exactly what is destroyed (tag registrations only, not tag assignments on Notes), what is explicitly spared (Notes and Cards), a version dependency (AnkiConnect v1), and a confirmation gate on a reviewed preview. That is substantive behavioral context the annotations alone do not convey.

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?

Three short sentences, front-loaded with the action and scope, followed by the safety boundaries and prerequisites. Every sentence carries distinct information with no restatement of the name or title.

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, guarded cleanup tool with annotations, full schema coverage, and an output schema, the description supplies the missing pieces: scope of deletion, non-destructive guarantees, and the preview-confirm protocol. An agent has everything needed to invoke it 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 description coverage is 100%, so dryRun, confirmDeletion, and expectedImpactHash are already documented and the baseline applies. The phrase 'confirmation of the reviewed preview' loosely ties the preview to the hash, but no format, ordering, or failure-mode semantics are added beyond 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 ('Previews and removes tag registrations that no Note uses') with an explicit scope constraint ('in the active collection'). The negative boundaries ('Does not remove tags from Notes or delete Notes or Cards') let an agent distinguish it from edit-note-tags or delete-notes-and-cards 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 Guidelines4/5

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

The description makes the use context and workflow clear: preview first, then act on a reviewed preview, with AnkiConnect v1 as a prerequisite. It does not name a sibling alternative or state when to prefer list-tags plus edit-note-tags instead, so a small gap remains.

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