Update note type templates
update-note-type-templatesValidates and replaces front/back HTML templates for a note type, defaulting to dry-run and applying all requested sides in one Anki undo step.
Instructions
Validates and replaces selected front/back HTML templates for one note type. Defaults to dry-run mode and applies all requested sides in one Anki undo step.
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>",
"templates": "<templates>"
},
"name": "update-note-type-templates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | When true, validate and report the proposed changes without modifying Anki | |
| modelName | Yes | Anki note type name. AnkiConnect calls note types "models" in its API. | |
| templates | Yes | ||
| 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 | ||
| changes | Yes | ||
| afterHash | Yes | SHA-256 hash of the current CSS and card templates | |
| modelName | Yes | ||
| beforeHash | Yes | SHA-256 hash of the current CSS and card templates | |
| validation | Yes | ||
| scopeWarning | Yes |