Add page
add_pageAppend a new page (tab) to the current draw.io diagram without altering existing pages or unsaved edits. Use it to add another diagram alongside, not replace everything.
Instructions
Append a new page (tab) to the current diagram WITHOUT touching existing pages or unsaved user changes. Use this when the user wants "another diagram alongside" — e.g. "add a CNN page" — instead of create_new_diagram which wipes everything.
Inputs:
name: optional display name for the tab (defaults to Page-N where N = existing-page-count + 1)
id: optional explicit page id; if omitted the server generates a short alphanumeric id
xml: optional starting content: the mxCell elements of the page (root cells "0" and "1" are added), or a bare . If omitted, the page starts blank.
Returns the new page's id, name, and index so the caller can immediately target it with edit_diagram.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Optional explicit page id. If omitted the server generates one. Must be unique across pages. | |
| xml | No | Optional starting content: the mxCell elements of the page, or a bare <mxGraphModel>. If omitted the page starts blank. | |
| name | No | Optional display name for the new tab (e.g. "CNN"). Defaults to "Page-N". |