Tool Reference Overview
The server currently exposes 64 tools across eleven categories.
Categories
- Process Management
- Tree & XAML
- Binding Diagnostics
- DependencyProperty
- Style/Template
- RoutedEvent
- Interaction
- Layout
- MVVM
- Performance
- State & Scene Diagnostics
Recommended order of use
Most real sessions should follow this progression:
Before step 1, confirm WPFDEVTOOLS_MCP_ALLOWED_TARGETS includes the reviewed target's exact local absolute executable path; unset or malformed values fail closed before connect attaches.
connect()for the default auto-discovery pathget_active_processget_ui_summaryorget_form_summaryfor scene-first context- Focused diagnostics
- Interaction or mutation
- Verification
pingonly when you need an explicit health check
Use get_processes(windowFilter) only when:
- more than one WPF target is available
- you need architecture/elevation details or an explicit candidate list before connecting
- you want to choose a specific
processIdbefore connecting
If you only need broader auto-discovery, prefer connect(windowFilter='all') and keep get_processes(windowFilter) for explicit disambiguation or metadata-first selection.
Categories at a glance
| Category | Typical first call | Why |
|---|---|---|
| Process Management | connect() |
Auto-discover and connect to the most relevant allowlisted WPF target quickly |
| Tree & XAML | find_elements |
Perform a compact lookup before expanding a full tree |
| Binding Diagnostics | get_binding_errors |
Find the most actionable binding failures quickly |
| DependencyProperty | get_dp_value_source |
Understand precedence and effective values |
| Style/Template | get_applied_styles |
Explain inherited or implicit visual behavior |
| RoutedEvent | get_event_handlers |
Investigate event routes and handlers before tracing or firing |
| Interaction | click_element |
Trigger behavior after locating and validating the correct element |
| Layout | get_layout_info |
Inspect bounds, desired size, and layout state |
| MVVM | get_viewmodel |
Inspect data and commands behind a view |
| Performance | get_render_stats |
Start performance triage |
| State & Scene Diagnostics | get_ui_summary |
Start with semantic context before using tree-heavy inspection |
Key capabilities worth learning early:
select_active_processandget_active_processfor explicit process selection when later calls omitprocessIdget_focus_stateandfocus_elementfor focus-sensitive keyboard and multi-window workflowscapture_state_snapshot,batch_mutate,wait_for_dp_change, andrestore_state_snapshotfor mutation-safe validation and rollbackdrain_eventsfor deterministic reads from the shared runtime event bufferfind_elementsfor compact lookup withexactor case-insensitivecontainsmatchingget_affected_elementsfor a cheap best-effort scan before broadget_bindings(recursive: true)inspectionget_state_diff,get_element_snapshot(elementId),diagnose_visibility, andget_interaction_readinessfor scene-level diagnostics that reduce screenshot dependence after a concrete elementId is knownget_ui_summaryandget_form_summaryfor semantic subtree summaries before deep inspection or form triage
Navigation model
- By default, tool responses keep
nextStepsas the compatibility field for older clients and also include anavigationenvelope withrecommended,alternatives,prefetchTools, andcontextRefs. nextStepsis derived fromnavigation.recommended, so both surfaces stay synchronized unlessget_binding_errorsexplicitly disables navigation.- Capable clients may pass
navigation=falseonget_binding_errorswhen they already know the next action and want to reduce response size. Schema-driven clients can rely on that opt-out there because the parameter is advertised in theget_binding_errorstool schema today. Do not assume other tool schemas expose that parameter unless they advertise it explicitly. prefetchToolsis advisory only and contains tool names for progressive schema loading.contextRefsare descriptive JSON only; they are not executable handles or hidden server-side orchestration.
Response shape notes
- Structured clients should read
result.structuredContentas the canonical wire payload. - High-value tool descriptions in
tools/listare intentionally brief discovery hints; usewpf://contracts/responsefor stable field-level contracts instead of relying on long inline prose. tools/listadvertises exactoutputSchemashapes for high-value tools such asconnect,get_processes,get_ui_summary,get_element_snapshot(elementId), state snapshot/restore, batch mutation, and screenshots. Other tools inherit the common structured payload schema with stable fields such assuccess,navigation, and common identifiers. Claude-compatible client smoke tests should validate discovery against these structured-output metadata shapes.- Need a machine-readable contract? Read MCP resource
wpf://contracts/response. It publishes the stable detailed WPF payload contract forstructuredContent,navigation,nextSteps,contextRefs, and theget_binding_errorsnavigation=falseopt-out beyond the commontools/listschema. - Need canonical tool metadata? Read MCP resource
wpf://contracts/tools. It publishes the machine-readable JSON manifest for tool names, categories, safety flags, capability tags, and parameter metadata. result.content[0].textis a compact JSON fallback that preserves high-signal top-level scalar fields and collection counts, not a duplicate transport of the full JSON object. SetWPFDEVTOOLS_TEXT_FALLBACK_MODE=fullonly for legacy text-only MCP clients; even then, base64 screenshots, log dumps, raw XAML/markup, and similar large fields are replaced with omission metadata in text fallback. Error results includeresult.content[0].annotations.- Diagnostic tools may also piggyback
pendingEventswhen the session has buffered runtime events. Usedrain_eventswhen you need an explicit deterministic read of the shared event buffer.
Generated Contract Snapshot
These values are generated from the runtime MCP contract resources. If a tool is added or renamed, a method signature changes, policy gates move, or response fields change, the documentation tests require this snapshot to be regenerated.
wpf://contracts/toolsSHA-256:fe179b86c0d386e26e3e68fc7185beae7830638541147651ab119933862529e3wpf://contracts/responseSHA-256:78a7564133b834b534029c39ceda3a2a7b9a234c246629fba68a82364857c03e- Validation scope:
toolCount,name,title,parameters,requiredParameters,inputSchemaHash,outputSchemaHash,capabilityTags,policyCapabilityTags,annotations,parameterConstraints,parameterVocabularies, andhighValueTools.
Use the category pages for the most important tools, semantics, and gotchas.