Skip to main content
Glama

Add note type template

add-note-type-template
Idempotent

Adds a new card template to a Normal note type in Anki, defaulting to dry-run validation that reports how many existing notes may generate a new card before you apply changes.

Instructions

Adds a new card template to a Normal note type. Defaults to dry-run mode and reports how many existing notes may generate a new card.

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>",
      "templateName": "<templateName>",
      "front": "<front>",
      "back": "<back>"
    },
    "name": "add-note-type-template"
  }
}

Input Schema

NameRequiredDescriptionDefault
backYesComplete HTML for the new back side
frontYesComplete HTML for the new front side
dryRunNoWhen true, validate and preview the template without modifying Anki
modelNameYesAnki note type name. AnkiConnect calls note types "models" in its API.
templateNameYesAnki card template name
expectedNoteCountNoExisting note count returned by the dry run; required when dryRun is false and blocks applying changed impact
expectedDesignHashNoHash returned by get-note-type-design; required when dryRun is false and blocks stale writes
confirmCardCreationNoMust be true when dryRun is false to confirm that Anki may generate a new card for each existing note

Output Schema

NameRequiredDescriptionDefault
dryRunYes
impactYes
appliedYes
changedYes
modelNameYes
templatesYes
validationYes
scopeWarningYes
addedTemplateYes
afterDesignHashYesSHA-256 hash of the current CSS and card templates
beforeDesignHashYesSHA-256 hash of the current CSS and card templates
previousTemplatesYes
cardCreationConfirmedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already disclose a non-read-only, idempotent, non-destructive mutation, and the description usefully adds that dry-run is the default and that impact on existing notes is reported. However, it omits the safety workflow itself: that applying requires the dry-run's note count, a design hash from get-note-type-design, and explicit confirmation — all of which live only in the schema.

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 tight sentences with the core action first and the dry-run safety default second. There is no redundant restatement of schema or annotations, so every clause earns its place.

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?

An output schema exists, so return values (the dry-run impact report) need not be explained, and the schema documents all eight parameters. The only meaningful gap is the absence of any hint that the apply path is gated behind dry-run-reported values, which matters for a mutation tool but is recoverable from the schema.

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?

With 100% schema description coverage, the schema already explains every parameter, including the dry-run/apply gating fields. The description adds only the general notion that existing notes may generate new cards, mapping loosely to expectedNoteCount, but contributes no meaning not already present in the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Adds a new card template') and narrows the target to a Normal note type. It is distinguishable from siblings like rename-note-type-template or delete-note-type-template by the verb alone, though it never names the closest alternative (update-note-type-templates) to draw the boundary explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies usage by stating that it defaults to dry-run mode and reports impact, but it gives no explicit when-to-use vs when-not guidance and no pointer to sibling tools for editing existing templates. An agent must infer that this is for adding rather than modifying templates.

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