Graphite: new document
graphite_new_documentCreate a new empty Graphite document and make it the active tab, returning its document ID. Use it before inserting SVG when you need a fresh document rather than editing the open one.
Instructions
Create a new, empty Graphite document and make it the active tab. Returns its document_id. The document has no artboard; artwork inserted afterwards lands at document coordinates where (0,0) is the origin and y grows downward. Use this before graphite_insert_svg when the user asks for a fresh document; do not call it if they want to edit what is already open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Tab name for the new document. | Untitled Document |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name Graphite actually assigned (it de-duplicates names of open documents). | |
| document_id | Yes | Graphite DocumentId as a decimal string. Pass it back to other tools when they accept a document_id. |