Mochi — Tool Reference
Mochi (mochi.cards) spaced-repetition flashcards: decks, cards, templates, and the due-review queue
Your AI assistant discovers and invokes these tools through the
MCP Server's meta tools —
it calls execute_tool with the tool name and arguments below.
# create_card write
Create a Mochi card from raw Markdown, optionally template-based.
Full description
Create a card from raw Markdown content. For a simple two-sided flashcard, prefer create_flashcard. For template-based cards, pass template_id and fields — call get_template first to discover the field IDs.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck to create the card in |
content | string | Yes | Card Markdown. Use '---' on its own line to separate the sides of a flashcard. |
template_id | string | null | No | Template ID; discover field IDs with get_template first |
fields | object | null | No | Template field values keyed by field ID (requires template_id) |
tags | array<string> | null | No | Manual tags, without the '#' prefix |
review_reverse | boolean | null | No | Also review the card back-to-front |
pos | string | null | No | Lexicographic sort position |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"description": "Deck to create the card in",
"title": "Deck Id",
"type": "string"
},
"content": {
"description": "Card Markdown. Use '---' on its own line to separate the sides of a flashcard.",
"minLength": 1,
"title": "Content",
"type": "string"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template ID; discover field IDs with get_template first",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID (requires template_id)",
"title": "Fields"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual tags, without the '#' prefix",
"title": "Tags"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Also review the card back-to-front",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
}
},
"required": [
"deck_id",
"content"
],
"title": "CreateCardParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Card": {
"properties": {
"id": {
"description": "Card ID",
"title": "Id",
"type": "string"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Deck the card belongs to",
"title": "Deck Id"
},
"content": {
"default": "",
"description": "Card Markdown content ('---' separates sides)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"description": "True if content was truncated in this response",
"title": "Content Truncated",
"type": "boolean"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template the card is based on, if any",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"description": "Manual tags (no '#' prefix)",
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"archived": {
"default": false,
"description": "Archived cards are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the card is in the trash",
"title": "Trashed"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review this card in reverse",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
},
"review_count": {
"default": 0,
"description": "Number of recorded reviews",
"title": "Review Count",
"type": "integer"
},
"last_review": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Most recent review: date, next due date, remembered",
"title": "Last Review"
},
"attachment_names": {
"description": "Attachment file names",
"items": {
"type": "string"
},
"title": "Attachment Names",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp",
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last update timestamp",
"title": "Updated At"
}
},
"required": [
"id"
],
"title": "Card",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"card": {
"$ref": "#/$defs/Card"
}
},
"required": [
"card"
],
"title": "CardResult",
"type": "object"
} # create_cards write
Create up to 15 Mochi cards in one call, with optional dedupe and Anki cloze conversion.
Full description
Create a batch of cards in one call, with per-card results.
Mochi has no bulk endpoint and allows one request at a time, so cards are
created sequentially — a full batch takes several seconds. Each card comes
back as created, skipped_duplicate, failed, or not_attempted, so a partial
batch is safe to retry: re-run with dedupe_by set and the already-created
cards are skipped. Template-based cards are not supported here — use
create_card for those.
Anki -> Mochi migration pattern:
1. Read the notes from Anki.
2. Pass each note as front/back (or pre-built Markdown content) with
convert_anki_cloze=true, which turns Anki's {{c1::answer}} markers
into Mochi's {{1::answer}} cloze syntax.
3. Pass each Anki note ID as external_id and set dedupe_by="external_id"
so re-runs and retries never import the same note twice. | Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck to create the cards in (per-card deck_id overrides) |
cards | array<BatchCardInput> | Yes | Cards to create, 1-15 per call — split larger imports across calls (with dedupe_by set, re-runs are idempotent) |
default_tags | array<string> | null | No | Tags applied to every card in the batch, without the '#' prefix |
dedupe_by | "none" | "external_id" | "content" | No | Skip cards that already exist in the target deck: 'external_id' matches the ext::<id> tag of previously imported cards; 'content' matches whitespace-normalized Markdown. Both also dedupe within the batch itself. Default: "none" |
convert_anki_cloze | boolean | No | Rewrite Anki cloze markers {{c1::answer}} (and {{c1::answer::hint}}) to Mochi's {{1::answer}} syntax. Hints are dropped — Mochi has no cloze hint syntax. Default: false |
stop_on_error | boolean | No | Stop at the first failed card; the rest return not_attempted Default: false |
Parameter schema (JSON)
{
"$defs": {
"BatchCardInput": {
"properties": {
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card Markdown ('---' on its own line separates sides). Provide content OR front+back, not both.",
"title": "Content"
},
"front": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Front side (Markdown); requires back",
"title": "Front"
},
"back": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Back side (Markdown); requires front",
"title": "Back"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual tags for this card, without the '#' prefix (merged with default_tags)",
"title": "Tags"
},
"external_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Stable source identifier (e.g. an Anki note ID). Stored on the card as a manual tag 'ext::<id>' and matched by dedupe_by=external_id on re-runs.",
"title": "External Id"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Override the batch deck_id for this card",
"title": "Deck Id"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Also review this card back-to-front",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
}
},
"title": "BatchCardInput",
"type": "object",
"additionalProperties": false
}
},
"properties": {
"deck_id": {
"description": "Deck to create the cards in (per-card deck_id overrides)",
"title": "Deck Id",
"type": "string"
},
"cards": {
"description": "Cards to create, 1-15 per call — split larger imports across calls (with dedupe_by set, re-runs are idempotent)",
"items": {
"$ref": "#/$defs/BatchCardInput"
},
"maxItems": 15,
"minItems": 1,
"title": "Cards",
"type": "array"
},
"default_tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Tags applied to every card in the batch, without the '#' prefix",
"title": "Default Tags"
},
"dedupe_by": {
"default": "none",
"description": "Skip cards that already exist in the target deck: 'external_id' matches the ext::<id> tag of previously imported cards; 'content' matches whitespace-normalized Markdown. Both also dedupe within the batch itself.",
"enum": [
"none",
"external_id",
"content"
],
"title": "Dedupe By",
"type": "string"
},
"convert_anki_cloze": {
"default": false,
"description": "Rewrite Anki cloze markers {{c1::answer}} (and {{c1::answer::hint}}) to Mochi's {{1::answer}} syntax. Hints are dropped — Mochi has no cloze hint syntax.",
"title": "Convert Anki Cloze",
"type": "boolean"
},
"stop_on_error": {
"default": false,
"description": "Stop at the first failed card; the rest return not_attempted",
"title": "Stop On Error",
"type": "boolean"
}
},
"required": [
"deck_id",
"cards"
],
"title": "CreateCardsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"CardCreateOutcome": {
"properties": {
"index": {
"description": "Position of the card in the request's cards array",
"title": "Index",
"type": "integer"
},
"status": {
"description": "created | skipped_duplicate (dedupe match) | failed (per-card error) | not_attempted (time budget or stop_on_error — safe to retry)",
"enum": [
"created",
"skipped_duplicate",
"failed",
"not_attempted"
],
"title": "Status",
"type": "string"
},
"card_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Created card ID (status=created)",
"title": "Card Id"
},
"external_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The card's external_id, if provided",
"title": "External Id"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Failure detail (status=failed)",
"title": "Error"
}
},
"required": [
"index",
"status"
],
"title": "CardCreateOutcome",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"description": "True when every card was created or skipped as a duplicate",
"title": "Success",
"type": "boolean"
},
"created": {
"default": 0,
"description": "Cards created",
"title": "Created",
"type": "integer"
},
"skipped_duplicates": {
"default": 0,
"description": "Cards skipped by dedupe",
"title": "Skipped Duplicates",
"type": "integer"
},
"failed": {
"default": 0,
"description": "Cards that errored — see per-card error messages",
"title": "Failed",
"type": "integer"
},
"not_attempted": {
"default": 0,
"description": "Cards not attempted (time budget or stop_on_error) — retry these",
"title": "Not Attempted",
"type": "integer"
},
"results": {
"items": {
"$ref": "#/$defs/CardCreateOutcome"
},
"title": "Results",
"type": "array"
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Caveats: incomplete dedupe scan or time budget exhaustion",
"title": "Note"
}
},
"title": "CreateCardsResult",
"type": "object"
} # create_deck write
Create a new Mochi deck, optionally nested under a parent deck.
Full description
Create a deck. Use parent_id to nest it under an existing deck.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Deck name (1-64 characters) |
parent_id | string | null | No | Parent deck ID to nest under |
sort | integer | null | No | Manual sort position |
Parameter schema (JSON)
{
"properties": {
"name": {
"description": "Deck name (1-64 characters)",
"maxLength": 64,
"minLength": 1,
"title": "Name",
"type": "string"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent deck ID to nest under",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual sort position",
"title": "Sort"
}
},
"required": [
"name"
],
"title": "CreateDeckParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Deck": {
"properties": {
"id": {
"description": "Deck ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Deck name",
"title": "Name",
"type": "string"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent deck ID (decks nest)",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual sort position",
"title": "Sort"
},
"archived": {
"default": false,
"description": "Archived decks are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the deck is in the trash",
"title": "Trashed"
},
"cards_view": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card view mode (list/grid/note/column)",
"title": "Cards View"
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card sort order within the deck",
"title": "Sort By"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review cards in reverse",
"title": "Review Reverse"
}
},
"required": [
"id",
"name"
],
"title": "Deck",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"deck": {
"$ref": "#/$defs/Deck"
}
},
"required": [
"deck"
],
"title": "DeckResult",
"type": "object"
} # create_flashcard write
Create a simple front/back Mochi flashcard in a deck.
Full description
Create a two-sided flashcard: front is the prompt, back is the answer.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck to create the flashcard in |
front | string | Yes | Front side (Markdown) |
back | string | Yes | Back side (Markdown) |
tags | array<string> | null | No | Manual tags, without the '#' prefix |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"description": "Deck to create the flashcard in",
"title": "Deck Id",
"type": "string"
},
"front": {
"description": "Front side (Markdown)",
"minLength": 1,
"title": "Front",
"type": "string"
},
"back": {
"description": "Back side (Markdown)",
"minLength": 1,
"title": "Back",
"type": "string"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual tags, without the '#' prefix",
"title": "Tags"
}
},
"required": [
"deck_id",
"front",
"back"
],
"title": "CreateFlashcardParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Card": {
"properties": {
"id": {
"description": "Card ID",
"title": "Id",
"type": "string"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Deck the card belongs to",
"title": "Deck Id"
},
"content": {
"default": "",
"description": "Card Markdown content ('---' separates sides)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"description": "True if content was truncated in this response",
"title": "Content Truncated",
"type": "boolean"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template the card is based on, if any",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"description": "Manual tags (no '#' prefix)",
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"archived": {
"default": false,
"description": "Archived cards are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the card is in the trash",
"title": "Trashed"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review this card in reverse",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
},
"review_count": {
"default": 0,
"description": "Number of recorded reviews",
"title": "Review Count",
"type": "integer"
},
"last_review": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Most recent review: date, next due date, remembered",
"title": "Last Review"
},
"attachment_names": {
"description": "Attachment file names",
"items": {
"type": "string"
},
"title": "Attachment Names",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp",
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last update timestamp",
"title": "Updated At"
}
},
"required": [
"id"
],
"title": "Card",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"card": {
"$ref": "#/$defs/Card"
}
},
"required": [
"card"
],
"title": "CardResult",
"type": "object"
} # delete_card write
PERMANENTLY delete a Mochi card and its attachments. Requires confirm=true.
Full description
Permanently delete a card and its attachments. Cannot be undone — for a recoverable alternative, archive via update_card(archived=true). Requires confirm=true.
| Parameter | Type | Required | Description |
|---|---|---|---|
card_id | string | Yes | Card ID to permanently delete |
confirm | boolean | null | No | Must be true to proceed. Deletion is PERMANENT and removes attachments — for a recoverable alternative, archive the card via update_card(archived=true). Default: false |
Parameter schema (JSON)
{
"properties": {
"card_id": {
"description": "Card ID to permanently delete",
"title": "Card Id",
"type": "string"
},
"confirm": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Must be true to proceed. Deletion is PERMANENT and removes attachments — for a recoverable alternative, archive the card via update_card(archived=true).",
"title": "Confirm"
}
},
"required": [
"card_id"
],
"title": "DeleteCardParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"message"
],
"title": "DeleteResult",
"type": "object"
} # delete_deck write
PERMANENTLY delete a Mochi deck. Requires confirm=true; prefer trash_deck.
Full description
Permanently delete a deck. This cannot be undone — prefer trash_deck. Requires confirm=true.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck ID to permanently delete |
confirm | boolean | null | No | Must be true to proceed. Deletion is PERMANENT — consider trash_deck instead (restorable in the Mochi app). Default: false |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"description": "Deck ID to permanently delete",
"title": "Deck Id",
"type": "string"
},
"confirm": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Must be true to proceed. Deletion is PERMANENT — consider trash_deck instead (restorable in the Mochi app).",
"title": "Confirm"
}
},
"required": [
"deck_id"
],
"title": "DeleteDeckParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"message"
],
"title": "DeleteResult",
"type": "object"
} # get_card read
Get a single Mochi card with full content.
Full description
Retrieve one card by ID with full (untruncated) Markdown content.
| Parameter | Type | Required | Description |
|---|---|---|---|
card_id | string | Yes | Card ID |
Parameter schema (JSON)
{
"properties": {
"card_id": {
"description": "Card ID",
"title": "Card Id",
"type": "string"
}
},
"required": [
"card_id"
],
"title": "GetCardParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Card": {
"properties": {
"id": {
"description": "Card ID",
"title": "Id",
"type": "string"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Deck the card belongs to",
"title": "Deck Id"
},
"content": {
"default": "",
"description": "Card Markdown content ('---' separates sides)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"description": "True if content was truncated in this response",
"title": "Content Truncated",
"type": "boolean"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template the card is based on, if any",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"description": "Manual tags (no '#' prefix)",
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"archived": {
"default": false,
"description": "Archived cards are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the card is in the trash",
"title": "Trashed"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review this card in reverse",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
},
"review_count": {
"default": 0,
"description": "Number of recorded reviews",
"title": "Review Count",
"type": "integer"
},
"last_review": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Most recent review: date, next due date, remembered",
"title": "Last Review"
},
"attachment_names": {
"description": "Attachment file names",
"items": {
"type": "string"
},
"title": "Attachment Names",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp",
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last update timestamp",
"title": "Updated At"
}
},
"required": [
"id"
],
"title": "Card",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"card": {
"$ref": "#/$defs/Card"
}
},
"required": [
"card"
],
"title": "CardResult",
"type": "object"
} # get_deck read
Get a single Mochi deck by ID.
Full description
Retrieve one deck by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck ID |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"description": "Deck ID",
"title": "Deck Id",
"type": "string"
}
},
"required": [
"deck_id"
],
"title": "GetDeckParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Deck": {
"properties": {
"id": {
"description": "Deck ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Deck name",
"title": "Name",
"type": "string"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent deck ID (decks nest)",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual sort position",
"title": "Sort"
},
"archived": {
"default": false,
"description": "Archived decks are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the deck is in the trash",
"title": "Trashed"
},
"cards_view": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card view mode (list/grid/note/column)",
"title": "Cards View"
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card sort order within the deck",
"title": "Sort By"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review cards in reverse",
"title": "Review Reverse"
}
},
"required": [
"id",
"name"
],
"title": "Deck",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"deck": {
"$ref": "#/$defs/Deck"
}
},
"required": [
"deck"
],
"title": "DeckResult",
"type": "object"
} # get_due_cards read
List Mochi cards due for review (read-only — grading happens in the app).
Full description
List the cards due for review on a date (default today), optionally for one deck. Read-only: the Mochi API cannot record review grades, so reviewing itself happens in the Mochi app.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | null | No | Only cards due in this deck |
date | string | null | No | ISO date (YYYY-MM-DD) to compute the due queue for; defaults to today |
content_max_chars | integer | No | Truncate each card's content to this many characters Default: 1500 |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Only cards due in this deck",
"title": "Deck Id"
},
"date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ISO date (YYYY-MM-DD) to compute the due queue for; defaults to today",
"title": "Date"
},
"content_max_chars": {
"default": 1500,
"description": "Truncate each card's content to this many characters",
"maximum": 20000,
"minimum": 100,
"title": "Content Max Chars",
"type": "integer"
}
},
"title": "GetDueCardsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Card": {
"properties": {
"id": {
"description": "Card ID",
"title": "Id",
"type": "string"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Deck the card belongs to",
"title": "Deck Id"
},
"content": {
"default": "",
"description": "Card Markdown content ('---' separates sides)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"description": "True if content was truncated in this response",
"title": "Content Truncated",
"type": "boolean"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template the card is based on, if any",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"description": "Manual tags (no '#' prefix)",
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"archived": {
"default": false,
"description": "Archived cards are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the card is in the trash",
"title": "Trashed"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review this card in reverse",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
},
"review_count": {
"default": 0,
"description": "Number of recorded reviews",
"title": "Review Count",
"type": "integer"
},
"last_review": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Most recent review: date, next due date, remembered",
"title": "Last Review"
},
"attachment_names": {
"description": "Attachment file names",
"items": {
"type": "string"
},
"title": "Attachment Names",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp",
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last update timestamp",
"title": "Updated At"
}
},
"required": [
"id"
],
"title": "Card",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"date": {
"description": "The date the due queue was computed for",
"title": "Date",
"type": "string"
},
"count": {
"default": 0,
"description": "Number of cards due",
"title": "Count",
"type": "integer"
},
"cards": {
"items": {
"$ref": "#/$defs/Card"
},
"title": "Cards",
"type": "array"
},
"note": {
"default": "The Mochi API cannot record review grades — reviews must be completed in the Mochi app.",
"description": "Review-loop limitation",
"title": "Note",
"type": "string"
}
},
"required": [
"date"
],
"title": "DueResult",
"type": "object"
} # get_template read
Get a Mochi template with its content and field IDs for creating cards.
Full description
Retrieve one template, including field IDs needed for the fields parameter of create_card.
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | Yes | Template ID |
Parameter schema (JSON)
{
"properties": {
"template_id": {
"description": "Template ID",
"title": "Template Id",
"type": "string"
}
},
"required": [
"template_id"
],
"title": "GetTemplateParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Template": {
"properties": {
"id": {
"description": "Template ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Template name",
"title": "Name",
"type": "string"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sort position",
"title": "Pos"
},
"fields": {
"description": "Template fields",
"items": {
"$ref": "#/$defs/TemplateField"
},
"title": "Fields",
"type": "array"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template Markdown with '<< Field >>' placeholders (get_template only)",
"title": "Content"
}
},
"required": [
"id",
"name"
],
"title": "Template",
"type": "object"
},
"TemplateField": {
"properties": {
"id": {
"description": "Field ID — use as the key in create_card fields",
"title": "Id",
"type": "string"
},
"name": {
"description": "Field display name",
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Field type (text, boolean, number, ...)",
"title": "Type"
}
},
"required": [
"id",
"name"
],
"title": "TemplateField",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"template": {
"$ref": "#/$defs/Template"
}
},
"required": [
"template"
],
"title": "TemplateResult",
"type": "object"
} # list_cards read
List Mochi cards, optionally filtered to one deck, with cursor pagination.
Full description
List cards, optionally filtered by deck. Returns one page; pass the returned bookmark back to get the next page. Card content is truncated to content_max_chars — use get_card for full content. Note: the Mochi API has no server-side text search.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | null | No | Only list cards in this deck |
limit | integer | No | Cards per page (1-100) Default: 25 |
bookmark | string | null | No | Pagination cursor from a previous list_cards response |
content_max_chars | integer | No | Truncate each card's content to this many characters Default: 1500 |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Only list cards in this deck",
"title": "Deck Id"
},
"limit": {
"default": 25,
"description": "Cards per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Limit",
"type": "integer"
},
"bookmark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pagination cursor from a previous list_cards response",
"title": "Bookmark"
},
"content_max_chars": {
"default": 1500,
"description": "Truncate each card's content to this many characters",
"maximum": 20000,
"minimum": 100,
"title": "Content Max Chars",
"type": "integer"
}
},
"title": "ListCardsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Card": {
"properties": {
"id": {
"description": "Card ID",
"title": "Id",
"type": "string"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Deck the card belongs to",
"title": "Deck Id"
},
"content": {
"default": "",
"description": "Card Markdown content ('---' separates sides)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"description": "True if content was truncated in this response",
"title": "Content Truncated",
"type": "boolean"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template the card is based on, if any",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"description": "Manual tags (no '#' prefix)",
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"archived": {
"default": false,
"description": "Archived cards are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the card is in the trash",
"title": "Trashed"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review this card in reverse",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
},
"review_count": {
"default": 0,
"description": "Number of recorded reviews",
"title": "Review Count",
"type": "integer"
},
"last_review": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Most recent review: date, next due date, remembered",
"title": "Last Review"
},
"attachment_names": {
"description": "Attachment file names",
"items": {
"type": "string"
},
"title": "Attachment Names",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp",
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last update timestamp",
"title": "Updated At"
}
},
"required": [
"id"
],
"title": "Card",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"cards": {
"items": {
"$ref": "#/$defs/Card"
},
"title": "Cards",
"type": "array"
},
"bookmark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Cursor for the next page; pass back via the bookmark param. An empty cards page means you have reached the end (a bookmark may be returned even on the last page).",
"title": "Bookmark"
}
},
"title": "CardListResult",
"type": "object"
} # list_decks read
List all Mochi decks, including nesting via parent_id.
Full description
List all decks in the user's Mochi account. Decks nest: a deck with a parent_id is a child of that deck. Trashed and archived decks are included and flagged.
No parameters.
Parameter schema (JSON)
{
"description": "No parameters.",
"properties": {},
"title": "Empty",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Deck": {
"properties": {
"id": {
"description": "Deck ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Deck name",
"title": "Name",
"type": "string"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent deck ID (decks nest)",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual sort position",
"title": "Sort"
},
"archived": {
"default": false,
"description": "Archived decks are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the deck is in the trash",
"title": "Trashed"
},
"cards_view": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card view mode (list/grid/note/column)",
"title": "Cards View"
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card sort order within the deck",
"title": "Sort By"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review cards in reverse",
"title": "Review Reverse"
}
},
"required": [
"id",
"name"
],
"title": "Deck",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"decks": {
"items": {
"$ref": "#/$defs/Deck"
},
"title": "Decks",
"type": "array"
},
"truncated": {
"default": false,
"description": "True if the deck list was cut off at the page cap",
"title": "Truncated",
"type": "boolean"
}
},
"title": "DeckListResult",
"type": "object"
} # list_templates read
List Mochi card templates and their field IDs.
Full description
List all card templates with their fields. Use get_template for a template's full Markdown content. The API cannot update or delete templates.
No parameters.
Parameter schema (JSON)
{
"description": "No parameters.",
"properties": {},
"title": "Empty",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Template": {
"properties": {
"id": {
"description": "Template ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Template name",
"title": "Name",
"type": "string"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sort position",
"title": "Pos"
},
"fields": {
"description": "Template fields",
"items": {
"$ref": "#/$defs/TemplateField"
},
"title": "Fields",
"type": "array"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template Markdown with '<< Field >>' placeholders (get_template only)",
"title": "Content"
}
},
"required": [
"id",
"name"
],
"title": "Template",
"type": "object"
},
"TemplateField": {
"properties": {
"id": {
"description": "Field ID — use as the key in create_card fields",
"title": "Id",
"type": "string"
},
"name": {
"description": "Field display name",
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Field type (text, boolean, number, ...)",
"title": "Type"
}
},
"required": [
"id",
"name"
],
"title": "TemplateField",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"templates": {
"items": {
"$ref": "#/$defs/Template"
},
"title": "Templates",
"type": "array"
},
"truncated": {
"default": false,
"description": "True if the template list was cut off at the page cap",
"title": "Truncated",
"type": "boolean"
}
},
"title": "TemplateListResult",
"type": "object"
} # trash_deck write
Move a Mochi deck to the trash (restorable only in the Mochi app).
Full description
Move a deck to the trash. Cards and child decks are effectively trashed too. Safer than delete_deck, but the API cannot restore from the trash — that is only possible in the Mochi app.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck ID |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"description": "Deck ID",
"title": "Deck Id",
"type": "string"
}
},
"required": [
"deck_id"
],
"title": "DeckIdParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Deck": {
"properties": {
"id": {
"description": "Deck ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Deck name",
"title": "Name",
"type": "string"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent deck ID (decks nest)",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual sort position",
"title": "Sort"
},
"archived": {
"default": false,
"description": "Archived decks are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the deck is in the trash",
"title": "Trashed"
},
"cards_view": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card view mode (list/grid/note/column)",
"title": "Cards View"
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card sort order within the deck",
"title": "Sort By"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review cards in reverse",
"title": "Review Reverse"
}
},
"required": [
"id",
"name"
],
"title": "Deck",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"deck": {
"$ref": "#/$defs/Deck"
}
},
"required": [
"deck"
],
"title": "DeckResult",
"type": "object"
} # update_card write
Update a Mochi card's content, deck, tags, or archived state.
Full description
Update card properties. Only the provided fields are changed. Note: review history is read-only — grades can only be recorded in the Mochi app.
| Parameter | Type | Required | Description |
|---|---|---|---|
card_id | string | Yes | Card ID to update |
content | string | null | No | New Markdown content |
deck_id | string | null | No | Move the card to this deck |
fields | object | null | No | Template field values keyed by field ID |
tags | array<string> | null | No | Replace manual tags (full list, without '#' prefix) |
archived | boolean | null | No | Archive/unarchive the card |
review_reverse | boolean | null | No | Also review the card back-to-front |
pos | string | null | No | Lexicographic sort position |
Parameter schema (JSON)
{
"properties": {
"card_id": {
"description": "Card ID to update",
"title": "Card Id",
"type": "string"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New Markdown content",
"title": "Content"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Move the card to this deck",
"title": "Deck Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Replace manual tags (full list, without '#' prefix)",
"title": "Tags"
},
"archived": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Archive/unarchive the card",
"title": "Archived"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Also review the card back-to-front",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
}
},
"required": [
"card_id"
],
"title": "UpdateCardParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Card": {
"properties": {
"id": {
"description": "Card ID",
"title": "Id",
"type": "string"
},
"deck_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Deck the card belongs to",
"title": "Deck Id"
},
"content": {
"default": "",
"description": "Card Markdown content ('---' separates sides)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"description": "True if content was truncated in this response",
"title": "Content Truncated",
"type": "boolean"
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Template the card is based on, if any",
"title": "Template Id"
},
"fields": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Template field values keyed by field ID",
"title": "Fields"
},
"tags": {
"description": "Manual tags (no '#' prefix)",
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"archived": {
"default": false,
"description": "Archived cards are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the card is in the trash",
"title": "Trashed"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review this card in reverse",
"title": "Review Reverse"
},
"pos": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Lexicographic sort position",
"title": "Pos"
},
"review_count": {
"default": 0,
"description": "Number of recorded reviews",
"title": "Review Count",
"type": "integer"
},
"last_review": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Most recent review: date, next due date, remembered",
"title": "Last Review"
},
"attachment_names": {
"description": "Attachment file names",
"items": {
"type": "string"
},
"title": "Attachment Names",
"type": "array"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Creation timestamp",
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last update timestamp",
"title": "Updated At"
}
},
"required": [
"id"
],
"title": "Card",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"card": {
"$ref": "#/$defs/Card"
}
},
"required": [
"card"
],
"title": "CardResult",
"type": "object"
} # update_deck write
Update a Mochi deck's name, parent, sort, or archived state.
Full description
Update deck properties. Only the provided fields are changed.
| Parameter | Type | Required | Description |
|---|---|---|---|
deck_id | string | Yes | Deck ID to update |
name | string | null | No | New deck name |
parent_id | string | null | No | New parent deck ID |
sort | integer | null | No | New manual sort position |
archived | boolean | null | No | Archive/unarchive the deck |
review_reverse | boolean | null | No | Review cards in reverse |
Parameter schema (JSON)
{
"properties": {
"deck_id": {
"description": "Deck ID to update",
"title": "Deck Id",
"type": "string"
},
"name": {
"anyOf": [
{
"maxLength": 64,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New deck name",
"title": "Name"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New parent deck ID",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "New manual sort position",
"title": "Sort"
},
"archived": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Archive/unarchive the deck",
"title": "Archived"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review cards in reverse",
"title": "Review Reverse"
}
},
"required": [
"deck_id"
],
"title": "UpdateDeckParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"Deck": {
"properties": {
"id": {
"description": "Deck ID",
"title": "Id",
"type": "string"
},
"name": {
"description": "Deck name",
"title": "Name",
"type": "string"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent deck ID (decks nest)",
"title": "Parent Id"
},
"sort": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Manual sort position",
"title": "Sort"
},
"archived": {
"default": false,
"description": "Archived decks are excluded from review",
"title": "Archived",
"type": "boolean"
},
"trashed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Trash timestamp if the deck is in the trash",
"title": "Trashed"
},
"cards_view": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card view mode (list/grid/note/column)",
"title": "Cards View"
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Card sort order within the deck",
"title": "Sort By"
},
"review_reverse": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Review cards in reverse",
"title": "Review Reverse"
}
},
"required": [
"id",
"name"
],
"title": "Deck",
"type": "object"
}
},
"properties": {
"success": {
"default": true,
"title": "Success",
"type": "boolean"
},
"deck": {
"$ref": "#/$defs/Deck"
}
},
"required": [
"deck"
],
"title": "DeckResult",
"type": "object"
}