Export an Anki deck
export_anki_deckExports Anki flashcard decks (.apkg) with rendered chemistry structures, reactions, and spectra for custom or curated molecule study cards.
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. The cards draw their structures, so learning needs no extra batch_generate call.
Not this tool for: structures only to look at, not to learn (use generate_molecule or batch_generate).
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; cloze=true makes fill-in-the-blank cards ({{c1::...}} in front.text, back.text is 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 and filename (ignored with curated_deck_id). cards: The flashcards. Fronts unambiguous, explanations on the back. default_tags: Tags added to every card. deliver: "apkg" (file), "open" (opens Anki, macOS) or "ankiconnect". curated_deck_id: one of the two ids above.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "export_anki_deck"
}
}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 | |
| previews | No |