Skip to main content
Glama

wpf_snapshot

Capture a subtree snapshot of layout, visibility, alignment, brushes, and text, then compare it with another snapshot to detect changes.

Instructions

Capture a snapshot of an element's subtree (layout metrics, visibility, alignment, brushes, text) and store it under a label, to diff later with wpf_diff. Workflow: wpf_snapshot(label='before') → make a change (e.g. wpf_set_property) → wpf_snapshot(label='after') → wpf_diff('before','after') to see exactly what moved. element_handle sets the subtree root (omit for the whole main window); max_depth default 25. Returns the label and how many elements were captured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
max_depthNo
element_handleNo
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses what data is captured (layout metrics, etc.) and the workflow. It does not detail whether the snapshot is deep or shallow, whether overwriting a label is allowed, or any side effects. It is decent but could be more explicit about safety (e.g., it's read-only).

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?

The description is concise, using three sentences. The first sentence states the core purpose, the second gives workflow context, and the third clarifies parameters. No redundant or filler words.

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?

Considering the tool has 3 parameters and no output schema, the description covers the workflow, parameter usage, and return (label and count). It is missing details about label uniqueness and persistence, but overall it provides sufficient context for an 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 input schema has 0% description coverage, so the description must compensate. It explains each parameter: label is for storing, max_depth default 25, element_handle sets subtree root or whole window. This adds meaningful context beyond the schema types.

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 the verb 'capture a snapshot' and specifies the resource: an element's subtree with details about what is captured (layout metrics, visibility, alignment, brushes, text). It distinguishes itself from the sibling tool wpf_diff, which compares snapshots, by explaining its role in the workflow.

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 explicit guidance on when to use this tool: in a workflow with wpf_snapshot before and after a change, followed by wpf_diff. It explains that element_handle sets the subtree root and max_depth defaults to 25. However, it does not mention when not to use it or alternatives beyond wpf_diff.

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