Skip to main content
Glama

Delete note type field

delete-note-type-field
DestructiveIdempotent

Permanently deletes one field and all its values from every note of an Anki note type, requiring a dry-run impact review and explicit data-loss confirmation before applying.

Instructions

Permanently deletes one field and all of its values from every note of a note type. Requires a dry-run impact review, current schema hash, unchanged non-empty note count, and explicit data-loss confirmation.

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": {
      "modelName": "<modelName>",
      "fieldName": "<fieldName>"
    },
    "name": "delete-note-type-field"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoWhen true, report the permanent data impact without modifying Anki
fieldNameYesExisting Anki note-type field name
modelNameYesAnki note type name. AnkiConnect calls note types "models" in its API.
confirmDataLossNoMust be true when dryRun is false to confirm permanent deletion of this field's values
expectedSchemaHashNoHash returned by get-note-type-schema; required when dryRun is false and blocks stale writes
expectedNonEmptyNoteCountNoNon-empty note count returned by the dry run; required when dryRun is false and blocks applying changed impact

Output Schema

NameRequiredDescriptionDefault
dryRunYes
fieldsYes
impactYes
appliedYes
changedYes
modelNameYes
validationYes
deletedFieldYes
scopeWarningYes
previousFieldsYes
afterSchemaHashYesSHA-256 hash of the ordered note-type field names
beforeSchemaHashYesSHA-256 hash of the ordered note-type field names
dataLossConfirmedYes
templateReferencesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/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, but the description adds what those hints cannot: deletion is permanent and value-level, and it is gated behind a dry-run plus stale-write protection (schema hash) and drift protection (non-empty note count). It stops short of saying what happens when other templates or cards reference the field, which is the main remaining behavioral unknown.

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?

Two sentences, zero filler. The destructive scope is front-loaded and the guard requirements follow in the order an agent must satisfy them.

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, six-parameter mutation with full schema coverage, explicit annotations, and an output schema, the description supplies everything the agent needs: exact effect, permanence, and the precondition chain. Return-value details are correctly omitted since an output schema exists.

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%, and the per-parameter descriptions already explain dryRun, expectedSchemaHash, and expectedNonEmptyNoteCount including their conditional requirement. The description adds only the joint framing of these four as an ordered guard sequence, which is modest value over the schema's own 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 with exact scope: 'Permanently deletes one field and all of its values from every note of a note type.' An agent can immediately distinguish this from siblings like rename-note-type-field or add-note-type-field, and the blast radius (every note, all values) is spelled out.

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 lays out a clear prerequisite workflow: dry-run impact review first, then schema hash, unchanged note count, and explicit data-loss confirmation. That effectively tells the agent when the tool is callable, though it never names an alternative or explicitly says to prefer a safer sibling when the intent is only renaming or repositioning.

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