Rename note type template
rename-note-type-templateRenames an Anki card template while preserving its order, HTML, generated cards, and review history. Runs in dry-run mode by default to preview changes before applying.
Instructions
Renames one card template without changing its order, HTML, generated cards, or review history. Defaults to dry-run mode.
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>",
"oldTemplateName": "<oldTemplateName>",
"newTemplateName": "<newTemplateName>"
},
"name": "rename-note-type-template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | When true, validate and preview the rename without modifying Anki | |
| modelName | Yes | Anki note type name. AnkiConnect calls note types "models" in its API. | |
| newTemplateName | Yes | Anki card template name | |
| oldTemplateName | Yes | Anki card template name | |
| expectedDesignHash | No | Hash returned by get-note-type-design; required when dryRun is false and blocks stale writes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | Yes | ||
| applied | Yes | ||
| changed | Yes | ||
| modelName | Yes | ||
| templates | Yes | ||
| validation | Yes | ||
| scopeWarning | Yes | ||
| afterDesignHash | Yes | SHA-256 hash of the current CSS and card templates | |
| renamedTemplate | Yes | ||
| beforeDesignHash | Yes | SHA-256 hash of the current CSS and card templates | |
| previousTemplates | Yes |