noteTypes.create
noteTypes_createCreates a normal or cloze note type in Anki with defined fields, templates, and CSS, enabling reusable note structures for new cards.
Instructions
Create a normal or cloze note type.
Anki-Connect method noteTypes.create. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, staleSession, validationFailed.
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": {
"name": "<name>",
"fields": "<fields>",
"templates": "<templates>"
},
"name": "noteTypes_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | Card styling shared by all templates. | |
| kind | No | `normal` or `cloze`. Default normal. | normal |
| name | Yes | Name of the new note type. | |
| fields | Yes | Ordered field definitions [{name, ...}]. | |
| session | No | Optional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from. | |
| latexSvg | No | Render LaTeX as SVG instead of PNG. Default false. | |
| sortField | No | Name of the field shown in the browser's sort column. Default: the first field. | |
| templates | Yes | Card templates [{name, questionHtml, answerHtml}]; field references use {{Field}} syntax. | |
| latexFooter | No | LaTeX postamble. | |
| latexHeader | No | LaTeX preamble. |