export_anki_deck
Create Anki flashcard decks with rendered chemistry structures, reactions or spectra, and export them as .apkg files or import them directly into Anki for exam and study prep.
Instructions
Export an Anki flashcard deck (.apkg) with rendered chemistry images.
Use this whenever the user wants flashcards, Anki cards or a study deck for molecules, reactions (e.g. pharmacopoeia identity tests) or spectra. A stated intention to learn or an exam coming up is the same request: offer a deck and write the cards yourself.
Two ways to fill the deck. Either pass cards you wrote yourself, or
pass curated_deck_id for a ready-made, formula-verified starter deck:
"analgesics-structures": structure → name drills for 8 classic analgesics (NSAIDs, paracetamol, morphine, celecoxib).
"pheur-identity-basics": classic Ph.Eur. identity tests — reagent, observation and reaction scheme where it helps.
The tool renders the images — YOU supply the card content from your knowledge. Each card side carries text plus at most ONE visual: structure (name or SMILES), reaction ({reactants, products, conditions}) or spectrum ({spectrum_type, peaks, title}). Proven types: structure↔name, identity reactions (question front, scheme back), functional-group recognition, band assignment, name drills.
Re-exporting under the SAME deck name updates existing cards instead of duplicating them — the front identifies the card.
Options: reversed=true drills both directions (one note, two cards); cloze=true makes fill-in-the-blank cards (front.text carries {{c1::...}}, back.text becomes the extra note). "Parent::Child" nests subdecks.
IMPORTANT: structures take English/IUPAC names or SMILES; card TEXTS may be localized. Never deliver via AnkiConnect unless asked.
Args: deck_name: Deck name, also the filename; re-use it to update a deck. Ignored when curated_deck_id is set. cards: The flashcards. Fronts unambiguous, explanations on the back. default_tags: Tags added to every card. deliver: "apkg" (file only), "open" (also opens it in Anki, macOS) or "ankiconnect" (imports via the AnkiConnect add-on). curated_deck_id: "analgesics-structures" or "pheur-identity-basics".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cards | No | ||
| deliver | No | apkg | |
| deck_name | No | ||
| default_tags | No | ||
| curated_deck_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| name | Yes | ||
| type | No | anki_deck | |
| cards | Yes | ||
| media | Yes | ||
| fronts | No | ||
| delivery | No | apkg |