edit_items
List and modify existing sketch items: inspect IDs, types, bounds, and vertices, then delete, move, transform, style, adjust joints, dimensions, or 3D primitive sizes by ID.
Instructions
List or change existing items. list → ids, type groups (Lines, Strokes, Rectangles, Circles, Triangles, Polygons, Fills, Text, Dimensions, Images), bboxes, vertices and joints of a layer. color_by_type gives each type its own palette colour. style can also set name, hidden, locked. delete/move/transform/style by ids. move_joint moves every vertex at (x,y) to (to_x,to_y) so joined lines follow. set_dimension sets a dimension to a value (in board units) and moves the geometry to match (parametric; the height dimension of a 3D primitive rebuilds the primitive). set_size changes the width/depth/height/radius of a parametric 3D primitive and rebuilds it.
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": {
"action": "<action>"
},
"name": "edit_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| cx | No | ||
| cy | No | ||
| dx | No | ||
| dy | No | ||
| id | No | dimension id for set_dimension | |
| ids | No | ||
| to_x | No | ||
| to_y | No | ||
| depth | No | ||
| layer | No | Layer id, exact name, or index (0 = bottom). Defaults to the active layer. | |
| scale | No | ||
| style | No | {color,width,opacity,fill,line_type,text,size,font,name,hidden,locked; text only: along (line id to attach, "" to detach), offset (slide along the line px), lift (raise off the line px)} | |
| value | No | ||
| width | No | ||
| action | Yes | ||
| height | No | ||
| radius | No | ||
| rotate | No | degrees | |
| group_id | No | set_size: a 3D primitive (or give id of any of its parts) |