enhancedocs
For agentsOpen Enhance ↗
Reference / canvas.createEditableFrame

Enhance documentation

canvas.createEditableFrame

Insert one validated primitive subtree beside its source screen as an atomic canvas edit.

↓ Markdown

canvas.createEditableFrame

mutation write

Use when the requested change exactly matches canvas.createEditableFrame; 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",
 "documentFormatVersion": 13,
 "mutationId": "00000000-0000-4000-8000-000000000010",
 "baseVersion": 1,
 "screenNodeId": "x",
 "draft": {
  "version": 1,
  "rootTemporaryId": "x",
  "nodes": [
   {
    "label": "x",
    "component": "x",
    "styles": {},
    "temporaryId": "x"
   }
  ],
  "relationships": []
 }
}

Result

Returns a typed canvas.createEditableFrame 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.
  • rootNodeId (required): Returned field rootNodeId.
  • idMap (required): Returned field idMap.
  • insertedNodeIds (required): Returned field insertedNodeIds.
  • removedNodeIds (required): Returned field removedNodeIds.
  • boxes (required): Returned field boxes.
  • affectedBounds (required): Returned field affectedBounds.
  • operation (required): Returned field operation.
  • 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": 1,
 "rootNodeId": "x",
 "idMap": {},
 "insertedNodeIds": [],
 "removedNodeIds": [],
 "boxes": {},
 "affectedBounds": {
  "x": 0,
  "y": 0,
  "width": 0,
  "height": 0
 },
 "operation": {
  "op": "insertConvertedSubtree",
  "destination": {
   "kind": "adjacent"
  },
  "rootNodeId": "x",
  "nodes": {},
  "relationships": {}
 },
 "next": []
}

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

  • Read the affected canvas resource to confirm the result.

Versions

Compatibility: d232118814f9ed0120bab91f8a520f14e72438999eafdc4307d10bafe86d1e6a.

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