Restore cards
restore_cardsUse this when the user wants an earlier version of a card back, for example after an edit they did not want. Every edit keeps the text it replaced. Give card_id alone to list the card's earlier versions, newest first, and confirm with the user which one; then call again with its revision_id. A restore rewrites the card's source and its sibling cards in place, keeping their schedules and review history, and keeps the text it replaces too. A restore that would remove cards is refused.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"card_id": "<card_id>"
},
"name": "restore_cards"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card_id | Yes | The card whose earlier versions to list or restore, from list_cards. A version covers the card's whole source, siblings included. | |
| revision_id | No | The version to put back: a revision_id this tool listed for the card, or one update_cards returned. Omit to list the versions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | How to reply when the cards are already on screen; on new cards, also where else the user can study them. | |
| created | No | ||
| updated | No | ||
| card_ids | No | ||
| revisions | Yes | The card's earlier versions, newest first; empty after a restore and for a card that was never edited. | |
| source_ids | No | ||
| deck_totals | No | ||
| revision_ids | No | One per source in source_ids: the earlier version of that source this edit kept, which restore_cards can put back; null when the edit changed nothing. |