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_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"
}