decks.create
decks_createCreate a normal Anki deck by name; returns the existing deck when an exact-name deck already exists. Use hierarchical names with :: for subdecks.
Instructions
Create a normal deck, returning the existing deck for an exact existing name.
Anki-Connect method decks.create. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, staleSession.
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>"
},
"name": "decks_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Full deck name; `::` separates levels, e.g. `Japanese::Verbs`. | |
| 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. |