add_card
Create flashcards in Anki with HTML formatting and media support. Specify deck, note type, and field content to build effective study cards.
Instructions
Create a new flashcard in Anki. Requires: deckName (exact deck name), modelName (note type like 'Basic' or 'Cloze'), and fields object matching the note type's field names. Returns card ID on success. FORMATTING: Use HTML only (NO markdown) - for line breaks, for bold, for italic, / for lists. Media files (audio/picture) support URLs or local absolute paths.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deckName | Yes | REQUIRED. Exact name of target Anki deck (case-sensitive). Examples: 'Spanish', 'Vocabulary', 'My Deck::Subdeck'. | |
| modelName | Yes | REQUIRED. Exact note type name (case-sensitive). Common types: 'Basic', 'Basic (and reversed card)', 'Basic (type in the answer)', 'Cloze'. Must match an existing note type in Anki. | |
| fields | Yes | REQUIRED. Field names (keys) and content (values). Keys must exactly match the note type's field names (case-sensitive). Example for 'Basic': {"Front": "Question?", "Back": "Answer"}. Use HTML formatting in values. | |
| tags | No | Optional. Comma-separated tags (e.g., 'vocabulary,lesson1,important'). Tags will be created if they don't exist. | |
| audio | No | Optional. Audio file attachments. Each requires: filename, path (URL or absolute local path like /path/to/audio.mp3), and fields array (field names to attach to). | |
| picture | No | Optional. Image file attachments. Each requires: filename, path (URL or absolute local path like /path/to/image.jpg), and fields array (field names to attach to). |