enhancedocs
For agentsOpen Enhance ↗
Reference / canvas.tree

Enhance documentation

canvas.tree

List stable node ids, hierarchy, kinds, and world-space boxes for one canvas.

↓ Markdown

canvas.tree

query read

Use when current canvas state is missing from the task context.

Before calling

  • Authenticate as the accountable Enhance person.
  • Use only resource identifiers returned by an earlier capability result or supplied by the person.

Input

Show complete JSON Schema
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"canvasId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["canvasId"]}

Example

Show example input
{
 "canvasId": "00000000-0000-4000-8000-000000000010"
}

Result

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

  • canvasId (required): Returned field canvasId.
  • version (required): Returned field version.
  • nodes (required): Returned field nodes.
Show complete result JSON Schema
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"canvasId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","maxLength":500},"kind":{"type":"string","minLength":1,"maxLength":100},"parentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"childCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"box":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["x","y","width","height"],"additionalProperties":false},{"type":"null"}]},"propertySections":{"type":"array","items":{"type":"string","enum":["position","layout","clip","cornerRadius","blending","typography","nativeControl","textDecoration","fill","outline","textStroke","border","outerShadow","innerShadow","filters","additionalStyles","vector","export","source"]}}},"required":["id","label","kind","parentId","childCount","box","propertySections"],"additionalProperties":false}}},"required":["canvasId","version","nodes"],"additionalProperties":false}

Example result

Show example result
{
 "canvasId": "00000000-0000-4000-8000-000000000010",
 "version": 1,
 "nodes": []
}

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

  • Use the returned identifiers and version in the next canvas operation.

Versions

Compatibility: c74e8c164a0e91cbe511aae7eaee2f8fd97bee814acffee701011374dc3de90e.

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