Skip to main content
Glama

wpf_explain_triggers

Explain WPF element triggers and attribute property values to their source. Evaluates style and control template triggers against current state, showing condition matches and active triggers to diagnose why a trigger isn't firing.

Instructions

Explain an element's triggers and where a value comes from — for 'why doesn't this trigger fire?' and 'which style/setter set this value?'. Lists the element's Style triggers (walking BasedOn) AND its ControlTemplate triggers (where most visual-state triggers live, e.g. IsMouseOver/IsEnabled on a Button), each EVALUATED against the current state: the condition (property=expected), the property's CURRENT value, whether it matches, whether the trigger is active, and the setters it applies. This tells you a trigger isn't firing because its condition property currently holds a different value. Pass property_name to also attribute that property's effective value to its source: a specific style setter (which style, which setter) or an active trigger (which condition), or local/inherited/default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
property_nameNo
element_handleYes
Behavior5/5

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

With no annotations provided, the description fully covers behavioral aspects: it lists triggers, evaluates conditions, shows current values, match status, active status, and setters. It also explains the optional property_name parameter for value attribution. No contradictions.

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

Conciseness4/5

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

The description is detailed but each sentence adds value. It is front-loaded with the primary purpose and use cases. Minor redundancy could be trimmed, but overall it is well-structured.

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?

Given no annotations, no output schema, and only two parameters, the description is complete: it explains both parameters, the output (list of triggers with evaluation), and the optional behavior when property_name is provided. It covers all necessary information for an AI agent to use the tool correctly.

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

Parameters4/5

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

The schema has 0% description coverage, so the description adds meaning: element_handle is implied as the target element, and property_name is explained as 'attribute that property's effective value to its source'. This compensates for the lack of schema descriptions.

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?

The description clearly states it explains triggers and value sources for WPF elements, with specific use cases like 'why doesn't this trigger fire?' and 'which style/setter set this value?'. It distinguishes itself from sibling tools by focusing on trigger evaluation and property attribution.

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

Usage Guidelines4/5

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

The description provides clear use cases for when to use this tool, such as debugging trigger firing and identifying value sources. However, it does not explicitly mention when not to use it or compare it to alternatives like wpf_get_styles or wpf_get_element_properties.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/faze79/WPFVisualTreeMcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server