Add a region
canvas_add_regionWhen: Use after the final layout to mark nodes that belong together without moving them into a zone. Regions do not move with layout.
Draw a labelled translucent area behind existing nodes to show they belong together, without reparenting them. Use this when the grouping is a reading aid rather than real containment, when areas would need to overlap, or when a node belongs to two ideas at once — canvas_group_nodes cannot express any of those because it moves nodes into the zone. Call canvas_measure_canvas first and size the region to enclose the nodes with roughly 24px of margin.
Batch: regions (up to 12) takes a list; put every item in one call rather than one call per item.
Operates on one Datadef diagram, named by diagram_id.
Returns compact JSON: the ids it created, changed or removed, the diagram revision, a one-line summary and the next step. A viewer-role account is refused.
Next: canvas_view to check the result.
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": {
"diagram_id": "<diagram_id>",
"regions": "<regions>"
},
"name": "canvas_add_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regions | Yes | ||
| diagram_id | Yes | Diagram id, from list_diagrams, create_diagram or create_blank_diagram. |