create_element
Creates Excalidraw elements—rectangles, ellipses, diamonds, text, arrows, and lines—at specified coordinates to build diagrams through the MCP server.
Instructions
Create a new Excalidraw element (100% Excalidraw v2 spec compliant). Supports rectangle, diamond, ellipse, text, arrow, line.
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": {
"type": "<type>",
"x": "<x>",
"y": "<y>"
},
"name": "create_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| id | No | ||
| text | No | ||
| type | Yes | ||
| color | No | Alias for strokeColor in text elements | |
| width | No | ||
| height | No | ||
| points | No | Array of points [[0,0], [dx,dy]] for arrows and lines | |
| opacity | No | ||
| fontSize | No | ||
| fillStyle | No | ||
| roughness | No | ||
| textAlign | No | ||
| fontFamily | No | 1 (Virgil), 2 (Helvetica), 3 (Cascadia), 5 (Excalifont) | |
| strokeColor | No | ||
| strokeStyle | No | ||
| strokeWidth | No | ||
| endArrowhead | No | ||
| verticalAlign | No | ||
| backgroundColor | No |