API & MCP
Everything a person can do on Spaced Repetition Scheduler (FSRS), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://deckwrightreviewschedule.usefulweb.site/api/v1/calculate– run Spaced Repetition Scheduler (FSRS)GET https://deckwrightreviewschedule.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Spaced Repetition Scheduler (FSRS)
Replays a review log (date, card, rating again/hard/good/easy) through the FSRS-5 spaced-repetition model or the classic SM-2 algorithm and returns today’s queue (cards relearned today, due reviews, new cards up to your daily limit), the next interval for every answer, each card’s stability, difficulty and recall probability, a 30-day forecast and study statistics. The same scheduler runs 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) |
log | textarea | "date,card,rating\n2026-11-02,hola,good\n2026-11-02,buenos días,good\n2026-11-02 | Review log (CSV: date, card, rating). One review per line: 2026-11-02,hola,good — the card is its id or its question text; the rating is again, hard, good, easy or 1–4. Deckwright’s “Export review log” writes this format. |
today | date | — | Today. The day to plan for; empty = today (UTC). |
scheduler | select (fsrs, sm2) | "fsrs" | Scheduler |
retention | number | 0.9 | Desired retention (FSRS). Probability of remembering a card when it comes due; higher means shorter intervals and more reviews. |
newPerDay | integer | 20 | New cards per day |
maxReviews | integer | 200 | Maximum reviews per day |
Example request
Spanish cards after one week (FSRS-5)
curl -X POST https://deckwrightreviewschedule.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","log":"date,card,rating\n2026-11-02,hola,good\n2026-11-02,buenos días,good\n2026-11-02,gracias,again\n2026-11-02,gracias,good\n2026-11-05,hola,good\n2026-11-05,gracias,hard\n2026-11-06,buenos días,easy\n2026-11-07,la estación,good\n","today":"2026-11-08"}'
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://deckwrightreviewschedule.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
deckwright_review_schedule - Local stdio connector:
node src/mcp-stdio.ts --tool=deckwright-review-schedule
{
"mcpServers": {
"deckwright-review-schedule": { "type": "http", "url": "https://deckwrightreviewschedule.usefulweb.site/mcp" }
}
}