Add a figure or connector
add_shapeInsert exactly one object in an existing drawing. Requires its editToken and latest revision; returns the new revision. Use a new unique shape.id; it will never overwrite another object.
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": {
"id": "<id>",
"editToken": "<editToken>",
"revision": "<revision>",
"shape": "<shape>"
},
"name": "add_shape"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Public drawing UUID (last component of its /draw/<uuid> URL). | |
| shape | Yes | Canvas object; for figure types include x/y center, width/height and optional rotation, text, annotation, style. Connector uses start/end instead of bounds. See get_drawing_format for every type. | |
| afterId | No | Optional existing object ID to insert immediately above this object in drawing order; empty string inserts first (bottom). Omit to append on top. | |
| revision | Yes | Revision from create_drawing, get_drawing or the previous edit. Stale revisions fail; read again before retrying. | |
| editToken | Yes | Private editing capability returned by create_drawing. Never place it in a URL or public answer. |