Add note type template
add-note-type-templateAdds 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
| Name | Required | Description | Default |
|---|---|---|---|
| back | Yes | Complete HTML for the new back side | |
| front | Yes | Complete HTML for the new front side | |
| dryRun | No | When true, validate and preview the template without modifying Anki | |
| modelName | Yes | Anki note type name. AnkiConnect calls note types "models" in its API. | |
| templateName | Yes | Anki card template name | |
| expectedNoteCount | No | Existing note count returned by the dry run; required when dryRun is false and blocks applying changed impact | |
| expectedDesignHash | No | Hash returned by get-note-type-design; required when dryRun is false and blocks stale writes | |
| confirmCardCreation | No | Must be true when dryRun is false to confirm that Anki may generate a new card for each existing note |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | Yes | ||
| impact | Yes | ||
| applied | Yes | ||
| changed | Yes | ||
| modelName | Yes | ||
| templates | Yes | ||
| validation | Yes | ||
| scopeWarning | Yes | ||
| addedTemplate | Yes | ||
| afterDesignHash | Yes | SHA-256 hash of the current CSS and card templates | |
| beforeDesignHash | Yes | SHA-256 hash of the current CSS and card templates | |
| previousTemplates | Yes | ||
| cardCreationConfirmed | Yes |