Update note type styling
update-note-type-stylingReplaces the shared CSS for every card of one Anki note type, defaulting to a dry-run validation and requiring a design hash to block stale writes.
Instructions
Validates and replaces the CSS shared by every card of one note type. Defaults to dry-run mode; applying requires expectedDesignHash. Reports applied only after reading back the exact CSS and confirming the Note Type identity and unchanged templates. A write/readback error may follow an applied change; do not blindly retry.
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>",
"css": "<css>"
},
"name": "update-note-type-styling"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | Yes | Complete replacement CSS for the note type | |
| dryRun | No | When true, validate and report the proposed change without modifying Anki | |
| modelName | Yes | Anki note type name. AnkiConnect calls note types "models" in its API. | |
| expectedDesignHash | No | Hash returned by get-note-type-design; required when dryRun is false and blocks stale writes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | Yes | ||
| dryRun | Yes | ||
| applied | Yes | ||
| changed | 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 | ||
| previousCss | Yes | ||
| scopeWarning | Yes |