canvas_add_subpage
Add a nested sub-canvas portal that previews another tldraw page of the same canvas and opens it on click, creating the target page if it doesn't exist.
Instructions
Add a nested sub-canvas portal: a rectangle that previews another tldraw page of the SAME canvas and opens it on click (in plugin builds with the feature; other builds show a labeled "⤵ name" rectangle on a board that still loads). Creates the target page when it does not exist yet. Portals persist as native geo shapes with meta.dgSubpage; the page hierarchy lives in page meta. Populate the target page afterwards with the add tools and their page parameter.
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": {
"canvas": "<canvas>",
"target_page": "<target_page>"
},
"name": "canvas_add_subpage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | ||
| w | No | ||
| x | No | ||
| y | No | ||
| page | No | Tldraw page to target (name or page record id), for canvases with several pages — see canvas_read `pages`. Omit on single-page canvases. | |
| graph | No | Graph name or nickname. Auto-selects if only one graph is configured. | |
| title | No | Portal title bar text; defaults to the target page's name | |
| accent | No | Portal accent color (hex); default #6d5ae0 | |
| canvas | Yes | Canvas page title (e.g. 'Canvas/My Map') or its 9-char page uid | |
| target_page | Yes | Tldraw page the portal opens into (name or page record id). A name that matches no existing page creates the page. |