API & MCP
Everything a person can do on Flashcards from Markdown, CSV or Anki Text, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://deckwrightcardsfrommarkdown.usefulweb.site/api/v1/calculate– run Flashcards from Markdown, CSV or Anki TextGET https://deckwrightcardsfrommarkdown.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Flashcards from Markdown, CSV or Anki Text
Reads study notes and makes flashcards with stable ids: Markdown “Q:”/“A:” pairs, “term :: definition” lines (“:::” adds the reverse card), {{c1::cloze}} gaps with optional hints (one card per gap number, like Anki), # headings as tags, CSV or tab-separated rows, an Anki “Notes in Plain Text” export (HTML turned into text) or a Deckwright slide deck (slide titles become questions). Returns the cards, a CSV file, the cards as editable Markdown and a link that opens them in Deckwright’s Study view.
| Field | Type | Default | Description |
|---|---|---|---|
text | textarea | "# Greetings\nhola ::: hello\nbuenos días ::: good morning\ngracias ::: thank yo | Cards. Markdown: “Q:” and “A:” lines, “term :: definition” (“:::” also makes the reverse card), {{c1::cloze}} gaps, # headings as tags. Or CSV/TSV rows (front, back, tag), an Anki plain-text export, or a slide deck. |
format | select (auto, markdown, csv, tsv, anki, deck) | "auto" | Format |
reverse | boolean | false | Also make reverse cards (answer → question) |
lang | text | — | Card language (BCP 47, e.g. en, es, ja). Used for answer checks and fonts; empty = English. |
Example request
Spanish phrases with reverse cards and two cloze gaps
curl -X POST https://deckwrightcardsfrommarkdown.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"text":"# Greetings\nhola ::: hello\nbuenos días ::: good morning\ngracias ::: thank you\n\n# Getting around\nQ: How do you ask where the station is?\nA: ¿Dónde está la estación?\n\nla estación :: the station\nel billete :: the ticket\n\n# At the café\nun café con leche :: a coffee with milk\n\nQ: How do you ask for the bill?\nA: la cuenta, por favor\n\nMadrid's main station is {{c1::Atocha}}; the fast train to Barcelona takes about {{c2::two and a half::how long?}} hours.\n","lang":"es"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://deckwrightcardsfrommarkdown.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
deckwright_cards_from_markdown - Local stdio connector:
node src/mcp-stdio.ts --tool=deckwright-cards-from-markdown
{
"mcpServers": {
"deckwright-cards-from-markdown": { "type": "http", "url": "https://deckwrightcardsfrommarkdown.usefulweb.site/mcp" }
}
}