set_property
Set and merge properties on Purl Studio objects—position, size, visibility, tags, content—with version checks for array/map values and type-change confirmation.
Instructions
Set properties on an object. Merges the given properties into the object. Use for position (x, y), size (width, height), visibility, tags, content (for text), dynamics settings, etc. For nested-shape properties (arrays/maps) the call is guarded: expectedVersion is required to prevent stale-baseline overwrites, and confirmTypeChange is required when the property's shape changes among array/map/scalar. Read with get_object first to obtain _versions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | THE USER'S EXACT PROMPT — verbatim, word-for-word, as typed. Do not summarize, paraphrase, translate, or shorten. Copy the user's message into this field exactly. Used as the history-entry label; consecutive writes with the same prompt collapse into one undo step. | |
| target | Yes | Name of the object to modify (formerly `objectName`, still accepted) | |
| cellName | No | Optional: cell to search in (by label) | |
| properties | Yes | Key-value pairs to set on the object (e.g., {"x": 0.3, "y": 0.5, "visible": false}) | |
| expectedVersion | No | Optional precondition map: {propName: hash} from get_object's `_versions`. REQUIRED for any property in `properties` whose CURRENT value is an array or map — prevents silently overwriting concurrent changes. Mismatch is reported with the actual hash so you can rebase. Scalar properties don't need versions. | |
| confirmTypeChange | No | Pass true to allow changing a property's shape among array/map/scalar. REQUIRED for those transitions; protects against accidental clobber of nested data with a scalar (or vice-versa). Creation (property absent → set) and deletion don't need this flag. |