enhancedocs
For agentsOpen Enhance ↗
Reference / canvas.apply

Enhance documentation

canvas.apply

Atomically apply bounded canvas edits and report their exact affected state.

↓ Markdown

canvas.apply

mutation write

Use when the requested change exactly matches canvas.apply; read the current state first when a version or identifier may have changed.

Before calling

  • Authenticate as the accountable Enhance person.
  • Use only resource identifiers returned by an earlier capability result or supplied by the person.
  • Reuse clientToken only when retrying this exact mutation input.

Input

Show complete JSON Schema (JSON file)

Example

Show example input
{
 "canvasId": "00000000-0000-4000-8000-000000000010",
 "baseVersion": 1,
 "operations": [
  {
   "op": "setText",
   "nodeId": "text_title",
   "text": "Ready"
  }
 ]
}

Result

Returns a typed canvas.apply result from the Enhance API without transport-specific prose.

  • canvasId (required): Returned field canvasId.
  • mutationId (required): Returned field mutationId.
  • previousVersion (required): Returned field previousVersion.
  • version (required): Returned field version.
  • operations (required): Returned field operations.
  • insertedNodeIds (required): Returned field insertedNodeIds.
  • changedNodeIds (required): Returned field changedNodeIds.
  • removedNodeIds (required): Returned field removedNodeIds.
  • boxes (required): Returned field boxes.
  • affectedBounds (required): Returned field affectedBounds.
  • copiedNodeIds: Returned field copiedNodeIds.
  • next (required): Returned field next.

Show complete result JSON Schema (JSON file)

Example result

Show example result
{
 "canvasId": "00000000-0000-4000-8000-000000000010",
 "mutationId": "00000000-0000-4000-8000-000000000010",
 "previousVersion": 1,
 "version": 2,
 "operations": [
  {
   "op": "setText",
   "nodeId": "text_title",
   "text": "Ready"
  }
 ],
 "insertedNodeIds": [],
 "changedNodeIds": [
  "text_title"
 ],
 "removedNodeIds": [],
 "boxes": {},
 "affectedBounds": null,
 "next": [
  "Inspect version 2."
 ]
}

Recovery

  • BAD_REQUEST: correct the named fields and call again.
  • UNAUTHORIZED: restore Enhance authentication, then retry once.
  • FORBIDDEN or NOT_FOUND: check the supplied resource and selection; do not substitute unrelated content. Ask for corrected access or scope if needed.
  • CONFLICT: read the current resource, merge the intended change, and retry with its version.
  • INTERNAL: run Enhance diagnostics, report the failure, and stop repeating the call.

Continue with

  • Reuse the committed version for the next edit. Render the affected screen when the requested visual change is ready to review.

Versions

Compatibility: 7f76b39c47806fc60b1f544dcdbde53490b23855cd1854d46a8f72012f9a06c4.

Minimum tested versions: Enhance CLI and MCP runtime 0.1.40, plugin 1.0.38, Node.js 24. No older floor is published.