riddle_builder_update
Edits an existing Riddle of any type with the same build configuration the riddle_builder_ tools take - but as a merge, not a rebuild: only what you send is changed. Blocks are addressed by their ID and can be added with "$create": true, removed with "$delete": true (see the "blocks" field) or reordered with "$blocksOrder" - and so are the entries of a block's "items"/"fields" and, for a Personality Test, its "personalities" (which cannot be reordered, see that field); a Placeholder's "conditions" is replaced as a whole though (see that field). Read the Riddle with riddle_get first to get its block IDs and current build configuration - what it returns under "build" is exactly the shape this takes, so it can be fed straight back in. Only Riddles that were created via the Riddle Builder tools (riddle_builder_*) or generated by the Riddle AI can be edited here - a Riddle the user built manually in the Creator can hold content this build config cannot express (riddle_get reports it as "warnings"), so editing it from here would mean editing around content you never saw, and it is rejected. Check context.origin.apiManageable on riddle_get (or "origin" on riddle_list/riddle_account_list) beforehand instead of finding out from the error; reading such a Riddle keeps working. Returns the edited Riddle in the same compact build-configuration envelope riddle_get returns ({uuid, type, modifiedAt, build, nextBlockId, warnings, published, context}). To replace a Riddle wholesale instead, build a new one with the riddle_builder_ tool of its type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| UUID | Yes | The UUID of the Riddle to edit (as returned by riddle_list / riddle_get) | |
| omit | No | Leaves parts of the returned envelope out. Values: "build", "warnings", "nextBlockId", "published", "context" (whole sections) and "build.omittedDefaults" (the per-block maps of properties left at their default, inside every build config in the response). Omit for the whole envelope. "uuid"/"type"/"modifiedAt" are always returned. Reach for omit: ["build.omittedDefaults"] on almost every build - it drops ~85-90% of the read-back and loses nothing, since riddle://reference/block-defaults/<block type> states the same defaults; what you must not do either way is resend those values. When you leave anything out the response names it under "omittedFields", so a missing key never means the Riddle has none of it. Same parameter as riddle_get's. | |
| build | Yes | The changes to apply, as a partial build configuration in the engine's own key names - the same shape riddle_get returns under "build" and the riddle_builder_<type> tools take. Only the fields you send are touched; send at least one. A field only exists for the Riddle types that have it, and unknown keys are rejected rather than ignored. | |
| publish | No | Whether to publish the Riddle after the edit; default is false, which leaves the changes in the draft. It rides along with an edit, it is not one: this tool with publish: true and an empty "build" is rejected with "Nothing to edit: send at least one of ...". To publish what is already in the draft, call riddle_publish. |