notes.convert
notes_convertConvert same-type Anki notes to a target note type using field and template mappings, with plan tokens validating the conversion before applying it.
Instructions
Convert same-type notes through Anki note-type conversion.
Mappings are complete target-name to source-name/null lists. Reject duplicate source mappings, mixed source note types and stale tokens. Removed source templates lose their cards/history as defined by Anki; cloze mappings use native supported rules, never raw mid assignment.
Anki-Connect method notes.convert. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession, unsupportedCapability.
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": {
"ids": "<ids>",
"target": "<target>",
"fields": "<fields>",
"templates": "<templates>",
"planToken": "<planToken>"
},
"name": "notes_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Notes to convert (decimal string, e.g. "1700000000001"); all must have the same note type. | |
| fields | Yes | Field mapping [{target, source}] (source = old field name or null), usually taken from `notes_planConversion`. | |
| target | Yes | Note type to convert to: exactly one of {"id": "<noteTypeId>"} or {"name": "<note type name, e.g. Basic>"}. | |
| 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. | |
| planToken | Yes | Token from `notes_planConversion`; it becomes invalid if either note type changes. | |
| templates | Yes | Template mapping [{target, source}] (source = old template name or null), usually taken from `notes_planConversion`. |