add_elements
Add shapes, text, arrows, and other elements to Excalidraw diagrams with customizable styles and positioning for creating visual diagrams.
Instructions
Add multiple Excalidraw elements to the canvas.
Supported element types:
rectangle
ellipse
diamond
arrow
text
line
freedraw
image
frame/magicframe
iframe/embeddable
Style options:
strokeColor: e.g. #1e1e1e
backgroundColor: e.g. #D97706
fillStyle: solid/hachure/cross-hatch
strokeWidth: 1-4
roughness: 0=architect, 1=artist, 2=cartoonist
Advanced options:
label: Auto-create bound text inside shape/arrow containers
start/end: Arrow endpoint binding to new or existing elements
containerId: DEPRECATED (use label instead)
Multi-session support: Specify sessionId to target a specific session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | No | Session ID. If not provided, uses default session. | |
| elements | Yes | Array of elements to add |