Skip to main content
Glama

wpf_set_property

Live-edit a WPF dependency property at runtime to test UI changes without rebuilding; values are converted to the property type and changes can be reverted.

Instructions

Live-edit a dependency property on an element at runtime, to test whether a planned UI change is effective without rebuilding. The value is a string converted to the property's type: e.g. property_name='Margin' value='20,0,20,0', property_name='Visibility' value='Collapsed', property_name='Background' value='Red' (or '#FF0000'), property_name='Width' value='300', value='{null}' for null. Returns the coerced value read back and what previously held the property (Binding/Local/Unset). Setting a data-bound property replaces the binding with a local value; wpf_revert_property restores it. Pair with wpf_capture_screenshot to see the effect, then revert. STATE-CHANGING (reversible via wpf_revert_property). Target by exactly one of element_handle or automation_id (exact, case-sensitive AutomationProperties.AutomationId). Use root_handle with automation_id to scope lookup; missing or duplicate IDs fail before input.

Input Schema

NameRequiredDescriptionDefault
valueYes
root_handleNo
automation_idNo
property_nameYes
element_handleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.17.2
    • addedInput schema / properties / automation_id
      Added value: +{
      +  "default": null,
      +  "type": "string"
      +}
    • addedInput schema / properties / element_handle / default
      Added value: +null
    • addedInput schema / properties / root_handle
      Added value: +{
      +  "default": null,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "element_handle",
      -  "property_name",
      -  "value"
      -]New value: +[
      +  "property_name",
      +  "value"
      +]
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden and does so: it declares STATE-CHANGING, reversible, explains that setting a bound property replaces the binding with a local value, describes the return (coerced value plus previous holder: Binding/Local/Unset), and warns missing/duplicate IDs fail before input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: purpose first, then value-format examples, then behavioral caveats, then targeting rules. Every sentence adds operational information the agent needs; nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with no annotations and no output schema, the description covers purpose, coercion semantics, binding side effects, reversal path, return shape, and targeting failures. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and does: value is a string coerced to the property's type with concrete examples (Margin '20,0,20,0', Visibility 'Collapsed', Background 'Red'/'#FF0000', '{null}' for null); property_name is exemplified; element_handle/automation_id/root_handle targeting rules are spelled out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (live-edit), a specific resource (a dependency property on an element at runtime), and the goal (test a UI change without rebuilding). An agent can immediately distinguish this from wpf_set_text or wpf_click_element.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit workflow guidance (pair with wpf_capture_screenshot, then revert via wpf_revert_property) and alternatives. Also states targeting prerequisites: 'exactly one of element_handle or automation_id', and how root_handle scopes lookup.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.