Skip to main content
Glama

wpf_revert_property

Reverts live property edits made with wpf_set_property, restoring prior bindings, local values, or defaults; target a specific edit by element and property or undo all pending edits.

Instructions

Undo live property edits made with wpf_set_property. By default reverts the most recent edit; pass element_handle and/or property_name to target a specific one, or all=true to undo every pending edit. Restores whatever held the property before (a binding, a local value, or nothing — falling back to style/inherited/default). Returns how many were reverted and how many edits remain pending. 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
allNo
root_handleNo
automation_idNo
property_nameNo
element_handleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.17.2
    • addedInput schema / properties / automation_id
      Added value: +{
      +  "default": null,
      +  "type": "string"
      +}
    • addedInput schema / properties / root_handle
      Added value: +{
      +  "default": null,
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description does heavy lifting: it discloses restore semantics (binding, local value, or nothing, falling back to style/inherited/default), the return content (count reverted, count remaining), and a failure mode ('missing or duplicate IDs fail before input'). It stops short of stating prerequisites such as needing an attached process or whether reverts survive a new snapshot/recording session.

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?

Four tight sentences, front-loaded with the inverse-of-set_property framing, then targeting, then restore behavior, then return/failure info. No redundancy or filler.

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

Completeness4/5

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

Covers return values despite no output schema and explains failure behavior, which is strong for a 5-param mutation. The only omission is session/attach prerequisites that gate whether the tool can be invoked at all.

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 carry all meaning, and it does: it explains all five parameters — all, element_handle, property_name, automation_id (exact, case-sensitive AutomationProperties.AutomationId), and root_handle scoping. It even adds semantics the schema lacks, such as the exactly-one-of targeting constraint.

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+resource ('Undo live property edits') and ties it directly to the sibling that creates them (wpf_set_property), so the inverse relationship is unambiguous. Defaults and override modes are named up front, letting an agent distinguish it from wpf_set_property or wpf_get_element_properties immediately.

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 when-to-use conditions: default = most recent edit, element_handle/property_name = targeted, all=true = every pending edit. Also names the mutual exclusivity rule ('exactly one of element_handle or automation_id') and the root_handle scoping pattern, with no inference required.

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