Common Workflows
These workflows are stable human-facing baselines, not a replacement for the navigation or nextSteps hints returned by the tools themselves. When a tool response already recommends the next action, follow that response first and use these workflows as supporting context.
Diagnose binding failures
connectget_binding_errors- Use
navigation.recommendedornextStepsto choose the next action - Common follow-ups are
get_affected_elements,get_bindings,get_element_snapshot(elementId), andget_binding_value_chain; use the element snapshot only after a concrete elementId is known - Use
get_datacontext_chainwhen the source path is still unclear force_binding_updateif you need to retrigger evaluationdrain_eventsif you need an explicit read of buffered binding or validation events after a mutation
Use this workflow when the UI looks wrong but the underlying issue may be a stale binding path, missing DataContext, converter failure, or invalid source chain. If get_binding_errors or get_bindings already points to a precise follow-up, prefer that guidance over mechanically running the entire sequence. Keep get_binding_errors in compact mode by default, and request verbose output only when the trimmed summary is insufficient.
Inspect a visual subtree
connectget_ui_summaryfind_elementsget_visual_treeget_logical_treeget_namescopeget_template_treecompare_trees
Use this when template-generated elements or content presenters make the logical view diverge from the visual view. Start with the scene summary so you only expand trees when semantic context is not enough.
Analyze dependency property precedence
connectget_dp_value_sourceget_dp_metadataget_applied_stylesget_resource_chainget_triggers
Use this when a property value is not coming from the source you expected.
Safe interaction validation
connect- Use
get_ui_summary,get_interaction_readiness, orget_element_snapshot(elementId)after identifying a concrete target elementId to confirm the scene and the target - Add tree, binding, or command inspection only when more detail is needed
- Use
click_element,simulate_keyboard, ordrag_and_drop - Follow
navigation.recommendedornextStepsfrom the interaction result - If the current session has an active snapshot,
get_state_diffis usually the first verification step - If the current session has buffered runtime events,
drain_eventsis the first explicit event-verification step - Without a snapshot, use
get_interaction_readiness,get_element_snapshot(elementId),get_dp_value_source, or scopedget_ui_summaryto verify the effect after a concrete elementId is known
Mutation with snapshot rollback
connectcapture_state_snapshot- Inspect the target with scene-level tools or another diagnostic tool
- Apply one mutation such as
set_dp_value,modify_viewmodel, oroverride_style_setter, or usebatch_mutatefor an ordered sequence - Call
get_state_difffirst - Call
drain_eventswhen you need an explicit read of buffered binding, DP, or validation events - If the tool response offers a more specific
navigation.recommended, use it for supplementary verification restore_state_snapshotif the app should return to its original state
Use this workflow for production-safe debugging, demos, or test sessions where the app must be left unchanged after the experiment. As long as the snapshot is still active, get_state_diff should be the default first verification tool after a mutation.
Minimal explicit chain: capture_state_snapshot -> snapshotId -> get_state_diff -> restore_state_snapshot. Keep the returned snapshotId from the capture response and pass it to both follow-up calls.
If the mutation targets a bound DependencyProperty, capture the affected ViewModel source with viewModelPropertyNames before changing it. A DependencyProperty-only snapshot can restore the binding expression while leaving a two-way source value changed.
Focus-sensitive multi-window workflow
connectget_windowsget_focus_stateget_visual_treeon the active window or target windowfocus_elementwhen the intended control does not currently own focussimulate_keyboardor another focus-dependent interaction- Verify focus and side effects with
get_focus_stateplus a diagnostic tool
Use this when keyboard shortcuts, Enter/Tab handling, default buttons, or dialog focus ownership may change the outcome.
Layout and performance triage
connectget_layout_infoget_clipping_infoinvalidate_layoutget_visual_countmeasure_element_render_timeget_render_statsfind_binding_leaks
Use this when the UI is visually broken, clipped, or sluggish.