Skip to main content
Glama

Update cards

update_cards
Idempotent

Use this when the user asks to fix, reword, correct or retag cards they already have. Changes 1-500 cards atomically: give card_id and only the fields to change (front_html, back_html, tags); the rest stay, cards keep their schedule and review history, and restore_cards can undo the edit. Read list_cards first; for a shared source copy its sibling_card_ids, one edit per source. The note type stays; an edit that would remove cards is refused (use delete_cards). Follow create_cards' field notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardsYesOn both sides keep the material's own terms, names and numbers. Write what plain text loses as HTML (10<sup>5</sup>, not 105; H<sub>2</sub>O; <br> between lines), and write each text in one script, as the material or the user writes it, never switching alphabets inside a word.

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.
createdYes
updatedYes
card_idsYes
source_idsYes
deck_totalsYes
revision_idsYesOne 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. Changed5 schema fields changed
    • addedInput schema / $defs / CardPatch / properties / back_speech
      Added value: +{
      +  "description": "With a back_html it changes: the new back's speech blocks.",
      +  "items": {
      +    "$ref": "#/$defs/SpeechBlockArg"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedInput schema / $defs / CardPatch / properties / front_speech
      Added value: +{
      +  "description": "With a front_html it changes: the new front's speech blocks (see\ncreate_cards).",
      +  "items": {
      +    "$ref": "#/$defs/SpeechBlockArg"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedInput schema / $defs / CueBlock
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "say": {
      +      "description": "\"equation\" for a formula too long to read, \"look\" for anything\nthat cannot be said aloud.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "say"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / $defs / SayBlock
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "lang": {
      +      "description": "The language the words are in: an ISO 639-1 code, with a region\nwhere the accent matters (\"es-MX\").",
      +      "type": "string"
      +    },
      +    "text": {
      +      "description": "The words, as they are said.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "lang",
      +    "text"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / $defs / SpeechBlockArg
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/SayBlock"
      +    },
      +    {
      +      "$ref": "#/$defs/CueBlock"
      +    }
      +  ],
      +  "description": "One block of what voice reads: words in one language, or a cue."
      +}
  2. 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."
  3. Changed1 schema field changed
    • changedInput schema / $defs / CardPatch / properties / sibling_card_ids / description
      Previous value: -"Required for shared sources; copy the exact set from list_cards."New value: +"Every card made from this card's source, this card included,\nexactly as list_cards shows them in source.sibling_card_ids. Needed\nwhen the source makes more than one card (a reversed pair, a cloze\nwith several gaps)."
  4. Changed4 schema fields changed
    • addedInput schema / $defs / CardPatch / properties / card_id / description
      Added value: +"The card to change, from list_cards."
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "Present when the cards are already on screen: how to reply.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / revision_ids
      Added value: +{
      +  "description": "One per source in source_ids: the earlier version of that source\nthis edit kept, which restore_cards can put back; null when the\nedit changed nothing.",
      +  "items": {
      +    "format": "int64",
      +    "type": [
      +      "integer",
      +      "null"
      +    ]
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "source_ids",
      -  "card_ids",
      -  "created",
      -  "updated",
      -  "deck_totals"
      -]New value: +[
      +  "source_ids",
      +  "card_ids",
      +  "created",
      +  "updated",
      +  "deck_totals",
      +  "revision_ids"
      +]
  5. Changed4 schema fields changed
    • addedInput schema / $defs / CardPatch / properties / back_html / description
      Added value: +"The answer to exactly what the front asks, as short as it can be while complete. Anything more (why, an example, a source) comes after the answer, set apart."
    • addedInput schema / $defs / CardPatch / properties / front_html / description
      Added value: +"The prompt, answerable on its own: one question, cue or cloze sentence carrying everything needed to answer it (the choices of a multiple-choice question, the context a case depends on). One idea per card: a list, a multi-part rule or a comparison becomes several cards, or a cloze with one blank per part."
    • addedInput schema / $defs / CardPatch / properties / tags / description
      Added value: +"A few short lowercase topic words (a chapter, a lesson, a theme), so the user can study one part later."
    • addedInput schema / properties / cards / description
      Added value: +"On both sides keep the material's own terms, names and numbers. Write what plain text loses as HTML (10<sup>5</sup>, not 105; H<sub>2</sub>O; <br> between lines), and write each text in one script, as the material or the user writes it, never switching alphabets inside a word."
  6. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag idempotentHint and destructiveHint=false, but the description adds crucial mechanics: partial patch semantics (only supplied fields change), atomicity across 1-500 cards, preservation of schedule and review history, undo via restore_cards, note type immutability, and refusal of edits that would remove cards.

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

Conciseness5/5

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

Dense but front-loaded: use-case first, then mechanics, then preconditions (read list_cards), then edge rules (no removal, note type stays), then pointer to create_cards. No wasted clauses.

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?

For a nested-patch mutation with an output schema, this description covers selection criteria, partial-update semantics, atomicity, undo path, preconditions, and safety constraints—enough for an agent to invoke correctly without reading other docs.

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% and field-level descriptions are rich (CardPatch fields fully described). The description still adds cross-cutting parameter guidance: supply card_id with only fields to change, copy sibling_card_ids from list_cards, and follow create_cards' field notes for HTML/speech fields.

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?

States a specific verb ('fix, reword, correct or retag'), resource (cards), and scope (1-500 existing cards), and explicitly names what distinguishes it from siblings delete_cards and create_cards.

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

Usage Guidelines5/5

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

Explicitly says when to use ('when the user asks to fix, reword, correct or retag cards they already have'), which sibling to use for removal (delete_cards), how to pre-read with list_cards, and the sibling_card_ids rule for shared sources.

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.