Rename note type field
rename-note-type-fieldRename a field across every note in an Anki note type while preserving existing values and updating template references automatically.
Instructions
Renames a field across every note of one note type while preserving its values. Anki updates template references to the renamed field.
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>",
"oldFieldName": "<oldFieldName>",
"newFieldName": "<newFieldName>"
},
"name": "rename-note-type-field"
}
}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. | |
| newFieldName | Yes | New field name. Anki special field names such as Tags, Type, Deck, Card, and FrontSide are not allowed. | |
| oldFieldName | Yes | Existing Anki note-type field name | |
| expectedSchemaHash | No | Hash returned by get-note-type-schema; required when dryRun is false and blocks stale writes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | Yes | ||
| fields | Yes | ||
| applied | Yes | ||
| changed | Yes | ||
| modelName | Yes | ||
| validation | Yes | ||
| renamedField | Yes | ||
| scopeWarning | Yes | ||
| previousFields | Yes | ||
| afterSchemaHash | Yes | SHA-256 hash of the ordered note-type field names | |
| beforeSchemaHash | Yes | SHA-256 hash of the ordered note-type field names |