Build a screen or section from a layout tree; returns boxes, ids and measured warnings. With a shell (Claude Code): write the fields to a JSON file, curl it to the upload link new_project gave and pass only upload_id, so the user approves a short call.
View input schema
{
"type": "object",
"properties": {
"verbose": {
"type": "boolean"
},
"artboard": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"root": {
"anyOf": [
{
"$ref": "#/$defs/__schema0"
},
{
"type": "string"
}
],
"description": "Layout tree (docs tool create_layout)."
},
"upload_id": {
"type": "string",
"description": "With a shell: the upload_id of a JSON file of this call's fields, sent with curl to the upload link new_project gave (keeps the user's approval box short). Fields in the call itself win."
}
},
"$defs": {
"__schema0": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"stack",
"grid",
"layers",
"text",
"rect",
"ellipse",
"image",
"icon",
"spacer",
"component",
"slot",
"arc",
"sparkline",
"area_chart"
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"width": {
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"height": {
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"grow": {
"type": "number"
},
"group": {
"type": "boolean"
},
"margin_x": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"direction": {
"type": "string",
"enum": [
"vertical",
"horizontal"
]
},
"gap": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"row_gap": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"padding": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "object",
"properties": {
"top": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"right": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"bottom": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"left": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"x": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"y": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}
}
]
},
"align": {
"type": "string",
"enum": [
"start",
"center",
"end",
"stretch"
]
},
"justify": {
"type": "string",
"enum": [
"start",
"center",
"end",
"space_between"
]
},
"columns": {
"type": "integer"
},
"fill": {
"type": "string"
},
"stroke": {
"type": "string"
},
"stroke_width": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"stroke_sides": {
"type": "string",
"enum": [
"all",
"top",
"bottom"
]
},
"radius": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"opacity": {
"type": "number"
},
"shadow": {
"type": "boolean"
},
"shape": {
"type": "string",
"enum": [
"rect",
"ellipse"
]
},
"content": {
"type": "string"
},
"style": {
"type": "string"
},
"size": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"weight": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"color": {
"type": "string"
},
"line_height": {
"type": "number"
},
"tracking": {
"type": "number"
},
"max_lines": {
"type": "integer"
},
"uppercase": {
"type": "boolean"
},
"font": {
"type": "string"
},
"icon": {
"type": "string"
},
"symbol": {
"type": "string"
},
"component": {
"type": "string"
},
"props": {
"type": "object",
"additionalProperties": {}
},
"src": {
"type": "string"
},
"fit": {
"type": "string",
"enum": [
"cover",
"contain"
]
},
"scrim": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"color": {
"type": "string"
},
"opacity": {
"type": "number"
},
"direction": {
"type": "string",
"enum": [
"bottom",
"top",
"left",
"right"
]
},
"start": {
"type": "number"
}
}
}
]
},
"name_hint": {
"type": "string"
},
"start_angle": {
"type": "number"
},
"end_angle": {
"type": "number"
},
"thickness": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"stroke_only": {
"type": "boolean"
},
"rotation": {
"type": "number"
},
"values": {
"type": "array",
"items": {
"type": "number"
}
},
"fill_area": {
"type": "boolean"
},
"labels": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
{
"type": "integer"
}
]
},
"y_labels": {
"anyOf": [
{
"type": "string",
"const": "auto"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}
]
},
"unit": {
"type": "string"
},
"highlight": {
"type": "integer"
},
"callout": {
"type": "string"
},
"fill_opacity": {
"type": "number"
},
"smooth": {
"type": "boolean"
},
"grid": {
"type": "boolean"
},
"children": {
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
}
}
}
}
}