noteTypes.getTemplateUsage
noteTypes_getTemplateUsageInspect a note type's question/answer templates to identify referenced fields in first-reference order, including conditional and filtered replacement fields.
Instructions
Inspect question/answer template field references.
Python adapter mirrors native token rules because the parsed tree is not exposed to Python. Includes conditional fields and filtered replacements, ignores HTML comments and special fields, supports legacy alternate delimiters, and returns real fields once in first-reference order.
Anki-Connect method noteTypes.getTemplateUsage. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, 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": {
"noteType": "<noteType>"
},
"name": "noteTypes_getTemplateUsage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| noteType | Yes | Note type: exactly one of {"id": "<noteTypeId>"} or {"name": "<note type name, e.g. Basic>"}. |