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

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

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. Changed1 schema field changed
    • changedInput schema / $defs / SpeechBlockArg / description
      Previous value: -"One block of what voice reads: words in one language, or a cue."New value: +"One block of what is read aloud: words in one language, or a cue."
  2. 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."
      +}
  3. 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."
  4. 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)."
  5. 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"
      +]
  6. 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."
  7. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnly=false, idempotent=true, destructive=false; the description adds the real behavior: atomic batch of 1-500, partial patches leave untouched fields intact, schedules and review history are preserved, note type is preserved, removal-triggering edits are refused rather than partially applied, and edits are reversible via restore_cards. That is exactly the beyond-schema context an agent needs before committing a bulk mutation.

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?

Front-loaded with the usage trigger, then constraints, then side effects, all in a tight block with no filler. It is dense — several distinct obligations in a few clauses — but each clause carries operational information.

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?

Mutation tool with annotations and an output schema, and the description still covers atomicity, batch size ceiling, partial-update semantics, irreversibility guard, undo path, shared-source handling, and the read-before-write prerequisite. An agent could call this correctly without opening another tool's docs except for field-level stylistic guidance.

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; the description still adds meaning by framing the payload as a patch ('give card_id and only the fields to change') and by explaining that sibling_card_ids must mirror list_cards' source.sibling_card_ids with one edit per source card. It defers field-level wording to create_cards rather than duplicating it, which is a reasonable cross-reference but slightly less self-contained.

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 and resource ('fix, reword, correct or retag cards they already have') and immediately distinguishes from siblings by naming create_cards, delete_cards, list_cards and restore_cards. The scope ('Changes 1-500 cards atomically') further pins down what the tool is.

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?

Explicit trigger ('when the user asks to fix, reword, correct or retag cards they already have'), explicit prerequisite ('Read list_cards first'), explicit alternative for removal ('an edit that would remove cards is refused (use delete_cards)'), and explicit undo path (restore_cards). Nothing is left to inference.

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.