Skip to main content
Glama

Update note fields

update-note-fields
DestructiveIdempotent

Preview and apply partial field patches to Anki notes; dry runs show raw HTML changes, while applying requires expected field hashes and validates the batch before writing.

Instructions

Previews partial field patches by default. To apply, set dryRun to false and provide expectedFieldHashes for every submitted field from get-note-details or a dry run. Validates the complete batch before writing and verifies saved values. Each submitted field replaces its complete value, including HTML.

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": {
      "updates": "<updates>"
    },
    "name": "update-note-fields"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview bounded raw HTML changes and full-value hashes without modifying Anki. Set false to apply with expectedFieldHashes.
updatesYes

Output Schema

NameRequiredDescriptionDefault
dryRunYes
appliedYes
changesYes
verifiedYes
updatedNotesYes
missingNoteIdsYes
rejectedUpdatesYes
unchangedNoteIdsYes
changedFieldCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is structured. The description adds genuinely useful context beyond that: write happens only after whole-batch validation, saved values are re-verified, and each submitted field replaces its full value including HTML (the concrete destruction). It stops short of stating auth/permission needs or what a partial-batch failure does to already-applied notes.

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?

Four tight sentences, front-loaded with the preview default that governs invocation. Every clause carries operational weight: apply conditions, hash source, validation ordering, verification, replacement semantics.

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?

An output schema exists so return values need no explanation, and the description covers the risky parts (dry-run default, hash precondition, full-value overwrite). It omits batch limits (50 notes) and failure-atomicity, but those live in the schema, leaving the definition broadly complete for a mutation tool.

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 coverage is 50%, and the schema itself already describes dryRun and expectedFieldHashes in detail. The description's contribution is the hard requirement that hashes cover every submitted field and the full-value-replacement semantics, which the schema also states for the patch object. Additional meaning is therefore modest rather than compensating for the coverage gap.

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?

States a specific verb+resource+scope: partial field patches to note fields, with a preview-by-default semantic. It is clearly distinguishable from tag-editing (edit-note-tags) and note-type siblings by resource alone, though it never names an alternative explicitly.

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?

Gives concrete mode guidance: default is a preview, and applying requires dryRun=false plus expectedFieldHashes for every submitted field sourced from get-note-details or a prior dry run. It does not cover when to avoid this tool or which sibling to use instead.

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