Skip to main content
Glama

Set card flag

set-card-flag
Idempotent

Applies or clears Anki flag colors on up to 100 card IDs and verifies saved flags; missing cards block the selection, and write errors stop later writes.

Instructions

Applies one of Anki's supported flag colors and verifies saved flags without exposing arbitrary internal card fields. Missing Cards block the whole selection; a write error stops later writes and may leave partial progress.

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": {
      "cardIds": "<cardIds>",
      "flag": "<flag>"
    },
    "name": "set-card-flag"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagYesAnki flag color to apply, or none to remove the current flag
cardIdsYesOne to 100 Anki card IDs

Output Schema

NameRequiredDescriptionDefault
flagYes
failedCardIdsYes
missingCardIdsYes
updatedCardIdsYes
unchangedCardIdsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, idempotent=true, destructive=false), the description discloses genuine failure semantics: missing cards abort the entire selection, and a write error stops subsequent writes and can leave partial progress. That partial-progress note is exactly the kind of context annotations cannot express. It is slightly opaque about what 'verifies saved flags' actually entails, keeping it below a 5.

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?

Two dense sentences with no filler, and the core action is front-loaded before the failure caveats. The phrase 'without exposing arbitrary internal card fields' is a bit of a tangent that costs clarity relative to its value.

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

Completeness4/5

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

With an output schema present, annotations covering the safety profile, and full parameter descriptions, the description only needed to add operational caveats, which it does. The remaining gap is that 'verifies saved flags' is not explained, though the output schema likely covers the returned data.

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

Parameters3/5

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

Schema description coverage is 100%, so both cardIds and flag (including the enum with 'none' to clear) are already fully documented in the schema. The description adds only that supported flag colors are used, which does not meaningfully extend the enum already present.

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

Purpose4/5

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

The description gives a specific verb and resource ('Applies one of Anki's supported flag colors') plus a scoping note ('without exposing arbitrary internal card fields'), which distinguishes it from broader card-mutation tools. It stops short of naming the closely related sibling (set-card-suspension) or stating a clean one-line scope distinction.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is mentioned. The reader must infer from the flag-color framing that this is the tool for flag assignment, with nothing to disambiguate it from other card-state setters.

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