Skip to main content
Glama
anki-connect-mcp
by SolarianGG

editors.updateDraft

editors_updateDraft

Update an Add draft by replacing or appending specified fields and tags, with note type and deck replacement, validating inputs before altering the draft.

Instructions

Update an Add draft through coordinated dialog setters.

Set note type before explicit deck. replace changes only supplied fields/tags. append concatenates supplied field strings and unions tags; deck/type still replace. Reject invalid fields before altering the draft.

Anki-Connect method editors.updateDraft. Scope: collection. Effect: gui. Completion: operation. Undo: none.

Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).

Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.

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": {
      "editorId": "<editorId>",
      "patch": "<patch>"
    },
    "name": "editors_updateDraft"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo`replace` (default) overwrites supplied fields/tags; `append` appends to fields and unions tags.replace
patchYesDraft changes: {noteType?, deck?, fields?, tags?}.
sessionNoOptional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from.
editorIdYesEditor `id` from the completed `editors_openAdd` operation.
timeoutSecondsNoMCP option (not sent to Anki): how long to wait for completion. A timeout does not cancel the work; the pending record is returned.
waitForCompletionNoMCP option (not sent to Anki): poll operations.get until the operation finishes and return its final record. If false, return the operation handle.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: scope=collection, effect=gui, Undo: none, an all-or-nothing validation guarantee ('Reject invalid fields before altering the draft'), a concrete error catalogue, and the fact that it is long-running by default. The annotations only cover safety hints, so this is real added value; minor gap is no note on concurrency beyond the editorConflict error name.

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-loads the purpose, then the mode rules, then compact metadata lines (method, scope, effect, completion, undo) and an error list. All sentences carry information; the long-running paragraph partially restates the waitForCompletion/timeoutSeconds schema text but does add that a timeout does not cancel the work.

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?

For a 6-parameter nested-patch mutation with no output schema, the description covers mutation semantics, atomicity, undoability, async behavior and failure modes. Only the shape of the returned operation/draft record is left implicit, which is acceptable given no output schema is declared.

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 baseline is 3, but the description earns an extra point by explaining the replace/append interplay across fields and tags and by stating an ordering constraint between noteType and deck that the schema does not express. It does not clarify the session or waitForCompletion semantics further, but those are already documented in-schema.

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?

Opens with a specific verb and resource ('Update an Add draft through coordinated dialog setters'), which clearly separates it from editors_openAdd (creation) and editors_openNote. It does not explicitly name a sibling as an alternative, but the resource is unambiguous.

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

Usage Guidelines3/5

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

Gives embedded usage rules: set note type before an explicit deck, choose replace vs append depending on whether tags should be unioned, and invalid fields are rejected before mutation. It never states when to use this versus editors_openAdd or notes_update, so guidance is implied rather than explicit.

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

Deploy Server

Other Tools