Skip to main content
Glama

Restore cards

restore_cards
Idempotent

Use 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_idYesThe card whose earlier versions to list or restore, from list_cards. A version covers the card's whole source, siblings included.
revision_idNoThe 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

TableJSON Schema
NameRequiredDescriptionDefault
noteNoHow to reply when the cards are already on screen; on new cards, also where else the user can study them.
createdNo
updatedNo
card_idsNo
revisionsYesThe card's earlier versions, newest first; empty after a restore and for a card that was never edited.
source_idsNo
deck_totalsNo
revision_idsNoOne 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / note / description
      Previous value: -"Present when the cards are already on screen: how to reply."New value: +"How to reply when the cards are already on screen; on new cards,\nalso where else the user can study them."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, but the description adds real substance: a restore rewrites the card's source and its sibling cards in place, schedules and review history are preserved, the replaced text is retained, and restores that would remove cards are refused. This explains exactly why the operation is non-destructive and idempotent, which the annotations alone cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the trigger, then the two-step call pattern, then the behavioral consequences. Every sentence carries distinct information, though the 'keeps the text it replaces too' clause near the end slightly echoes the opening sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be explained. The description still covers the trigger, the listing/restore call sequence, the in-place rewrite scope including siblings, and the refusal condition, which is everything an agent needs to invoke this tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes beyond it by specifying the ordering of the listing ('newest first') and the confirm-with-user step between the two calls, which the schema does not state. It also mirrors the schema's note that a version covers sibling cards, so the marginal gain is real but modest.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource (restore an earlier version of a card) and immediately distinguishes the action from ordinary editing by explaining that every edit retains the replaced text. An agent can tell this apart from update_cards, delete_cards, or archive_deck without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a concrete trigger ('user wants an earlier version of a card back, for example after an edit they did not want') and a full two-phase procedure: call with card_id alone to list, confirm with the user, then call again with revision_id. It does not, however, name the alternative tools (e.g. update_cards) that an agent should choose instead when the user wants a new edit rather than a restore.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.