apply_wireframe_operations Atomically edit wireframes with expectedRevision and expectedWireframeVersion from read_wireframe. Stale edits reject. Operations use discriminated schemas; send targeted changes. Reuse returned versions; dryRun does not save. Retry lost responses with identical requestId/input. Details: /docs/mcp/apply_wireframe_operations. Caller context: navigate/open_modal/set_state interactions may include callerVariables:[visual variable IDs] (an empty list captures only navigation). Capture runs before stateChanges. action:return_to_caller restores the latest captured screen/history/modals and selected variable values/absence; unselected balances, rewards and purchases remain current. No caller means no change. Nested callers restore LIFO. Back/close_modal and browser Back/Escape also restore at the captured boundary. CLI qraft apply uses the same schema. read_wireframe view:prototype returns optional state.callers; pass the returned state unchanged to resume. Caller limits: 20 frames, 64 KiB combined snapshots. Visual states: add_state_layer {layer:{id,name,condition,screens:{},interactions:{}}}, update_state_layer {layerId,patch:{name?,condition?}}, delete_state_layer, reorder_state_layers {ids}, edit_state_layer {layerId,edits:[ordinary screen/component/interaction operations]}, reset_state_override {layerId,screenId,componentId?,property?}. Store only differences; deleting a base component hides it in that layer. Layer screen maps contain patch/additions/overrides/order. Later matching layers win changed properties and interaction definitions; conditions reuse the compound predicate model. visible:false hides product elements; enabled:false disables all triggers. Runtime variables stay local and persist across navigation until Restart. One shared dialog binds content via stateBinding; a single open_modal interaction sets its text/labels/tone in stateChanges before opening. Inherited/instance element operations require scalar resolved component IDs from read_wireframe(view=full, screenId), never authored instance/leaf paths. Targeted reset: {type:reset_override,screenId:SCREEN,componentId:RESOLVED_ID,property:content}; omit property to reset only that element. Reference operations: set_definition_kind, derive_screen, convert_to_component, add/update/delete_instance, reset_override, restore_inherited_elements, detach_screen, set_approval (pending|self|descendants). See /docs/guides/wireframe for material approval rules. Atomically edit a Wireframe tab. Supply expectedRevision and expectedWireframeVersion from read_wireframe; stale edits reject. CLI qraft apply --retry-unchanged-wireframe explicitly retries unrelated revision advances only if the original expectedWireframeVersion still matches a bounded read; changed content conflicts and unknown outcomes recover by receipt first. Screens carry board tags: add_screen screen.tags or update_screen patch.tags replaces them ([] removes); use them for scopes such as a release ("Version 1") instead of name prefixes, and reuse spellings from read_tags. Complete discriminated operation schemas are in operations.items.oneOf (some clients collapse unions visually); operations description includes minimal creation/edit examples. Design annotations: add_annotation {screenId, annotation:{id,content,x,y,width?,height?,anchor?}}, update_annotation {screenId,annotationId,patch}, delete_annotation {screenId,annotationId}, convert_annotation {screenId,componentId,to:annotation|component,anchor?}. Anchor is {type:component,componentId} or {type:region,x,y,width,height}; omit for a screen note. Component-anchored x/y are offsets from the target. Changing anchors preserves position unless x/y are supplied. Deleting or converting a target detaches its notes in place. Conversion preserves IDs and original UI styling but removes interactions/state bindings; converting back does not restore them. Existing components are never auto-classified. Hierarchy: auto_layout_hierarchy arranges inheritance trees into saved secondary screen.hierarchyPosition coordinates; arrange_screens layout:hierarchy edits these positions without changing normal x/y (default layout:canvas). Layout changes preserve approvals. Placeholder images: upload once (upload_asset_from_url/create_asset_upload), then set media:{id,mimeType,filename} on an image_placeholder (add_component or update_component patch), mediaFit:cover (default)|contain; media:null clears. Other types reject media. Operations: set_wireframe_options (purpose and initialState), fit_component (estimated text height), add/update/delete/duplicate_screen, add/update/delete/move/resize_component, reorder_components, add/update/delete_interaction, arrange_screens, set_start_screen. Screen-level interactions use sourceComponentId:null with trigger:event + eventName, or trigger:after_delay + delayMs (10–3600000). action:set_state uses stateChanges:[{variable,operation:set|increment|toggle,value?}] without navigation; navigation may also carry stateChanges. Optional condition is a literal {variable,operator:eq|ne|gt|gte|lt|lte,value} comparison or nonempty {all:[conditions]} / {any:[conditions]} groups. Maximum 3 nested groups, 16 children/group, 64 total nodes; missing variables never match and types are not coerced. Conditions run locally in browser playback and agent stepping; no expressions. set_wireframe_options.patch configures purpose and flat initialState; component.stateBinding displays/edits a preview variable. Stable IDs never change on edits. Component array order is back to front. duplicate_screen requires idMap for every local source component, instance, group and outgoing interaction; internal targets remap, external targets remain. Deletion cascades incident links; require explicit user intent. Unlock locked components before editing. replace_wireframe supports conditional undo/import. All supplied IDs must be distinct. Retry lost responses with identical requestId and payload; dryRun validates without saving and returns up to 20 structural audit warnings, including estimated text fit. It does not prove conditional paths executable; use view=prototype to exercise them. Limits: 500 operations, 4 MiB request, 8 MiB Wireframe JSON, 200 screens, 1000 components/screen and 10000 total, 5000 interactions, 100 scalar state variables; /api/v1/capabilities exposes these as limits.wireframe. Reuse revisionAfter and wireframeVersion from the receipt for your next batch.