API & MCP

Everything a person can do on Outline Notes to Flashcards, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://lessonleafoutlinecards.usefulweb.site/api/v1/calculate – run Outline Notes to Flashcards
  • GET https://lessonleafoutlinecards.usefulweb.site/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

Outline Notes to Flashcards

Reads study notes written as an outline (nested “- ” lists, headings, paragraphs) and finds the flashcards written inside them: “term :: definition” lines, “:::” for cards in both directions, {{c1::cloze}} gaps, and “question ::” lines whose indented sub-points are the answer (list answers). Each card keeps its place in the outline (the parent points become its context) and the tags from #tags and the front matter. Returns the cards, a card CSV, an Anki “Notes in Plain Text” file and a link that opens the notes in Lessonleaf.

Inputs of Outline Notes to Flashcards
FieldTypeDefaultDescription
texttextarea"---\ntitle: Cell biology\ntags: [biology]\n---\n- Organelles\n - Nucleus :: hoNotes (Markdown outline). Nested “- ” lists (two or four spaces per level), # headings and paragraphs. Cards: “term :: definition”, “term ::: definition” (both ways), {{c1::gap}}, or “question ::” followed by indented answer points. Optional front matter with title and tags.

Example request

Biology outline with list answers, a two-way card and cloze gaps

curl -X POST https://lessonleafoutlinecards.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"text":"---\ntitle: Cell biology\ntags: [biology]\n---\n- Organelles\n  - Nucleus :: holds the cell's DNA\n  - Mitochondria :: make ATP by cellular respiration #exam\n- Parts of every cell ::\n  - cell membrane\n  - cytoplasm\n  - ribosomes\n- Aerobic respiration ::: respiration that needs oxygen\n- The {{c1::cell membrane}} controls what enters the cell; plants also have a {{c2::cell wall}}.\n- Chloroplasts are only found in plant cells (a note, not a card).\n"}'

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://lessonleafoutlinecards.usefulweb.site/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: lessonleaf_outline_cards
  • Local stdio connector: node src/mcp-stdio.ts --tool=lessonleaf-outline-cards
{
  "mcpServers": {
    "lessonleaf-outline-cards": { "type": "http", "url": "https://lessonleafoutlinecards.usefulweb.site/mcp" }
  }
}