penpot_update_shapes
Update existing shapes by ID, modifying only specified properties while preserving others. Supports all shape types including rect, text, path, and group.
Instructions
Update one or more existing shapes in place, by id. Supports rect, frame, text, circle, bool, path, group, image, svg-raw, and any other shape type. Only the fields you pass are changed — everything else on the shape (child positions, component/variant tags, etc.) is left untouched. Geometry fields (x/y/width/height/rotation) automatically recompute the shape's selection box and transform, so partial geometry edits stay consistent. Exception: for path shapes, x/y/width/height are always derived from path content and cannot be set directly — provide "content" (an array of path commands) to relocate or reshape a path. For image shapes, use "mediaId"/"mediaWidth"/"mediaHeight"/"mtype" to swap the displayed image to a different already-uploaded media object. Colors, corner radii (r1-r4), and shadows each accept either a literal value or a { token: "name" } reference resolved against the project token file (colors/radii/shadows tables respectively); "clearStroke"/"clearShadows" remove strokes/shadows entirely (ignored if "stroke"/"shadows" is also given). "layout" (frame shapes only) sets or replaces the frame's auto-layout; "layoutItem" sets or replaces the shape's own placement within its parent auto-layout frame — both accept the same schema as penpot_add_shapes. Note: updating a group's x/y/width/height only adjusts the group's stored bounding box and does not move its children — use penpot_align_shapes or penpot_distribute_shapes to move a group as a unit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | ||
| pageId | Yes | ||
| patches | Yes | ||
| tokensPath | No | /app/tokens.json |