set_value_at_path
Set a single nested value at a path, auto-creating intermediate objects or arrays while preserving siblings. Ideal for updating one deep field in a Purl object.
Instructions
Set a single nested value at the given path. Auto-creates intermediate objects/arrays where needed. Siblings stay intact. Use this instead of set_property for changing one field deep in a DATA prime's value (or any other nested property).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Dotted/bracketed path to the leaf (e.g., "value[5].correct", "value.config.maxAlt"). At least one segment required. | |
| value | Yes | New value at the path. Any JSON: scalar, array, or object. | |
| 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 whose property holds the value (formerly `objectName`, still accepted) | |
| cellName | No | Optional: cell to search in (by label) | |
| expectedVersion | No | Optional precondition: hash of the top-level property (from get_object's `_versions[topSlot]`). When supplied, rejects the write if the top slot has changed since you read it. |