Skip to main content
Glama

Find Unresolved XAML Bindings

find_unresolved_bindings
Read-onlyIdempotent

Detect silently broken XAML bindings whose root member is missing from a confidently resolved DataContext view-model, catching typos or renamed/removed members that compilers and smoke tests miss.

Instructions

List silently broken XAML bindings: a {Binding X} whose root member does NOT exist on its confidently resolved DataContext view-model (typo, removed/renamed member, or wrong DataContext) - the defect class that NEITHER the compiler NOR render-smoke tests catch.

Use it after renaming or removing view-model members. It judges the ROOT member of a binding path only. To see where a member or a resource key is bound use find_binding_usages / find_resource_usages.

Covers WPF/WinUI .xaml (view-model via d:DesignInstance or a unique FooView->FooViewModel convention) and Avalonia .axaml ({Binding}/{CompiledBinding}, only via x:DataType). Conservative BY SKIPPING, and the skip is what carries the accuracy claim: a binding whose DataContext scope cannot be typed with certainty (ControlTemplate/Style, runtime DataContext, keyed resources, a DataType-less template unless - WPF only - its host's ItemsSource types it), or whose view-model has an unverifiable external base, is never flagged - a recall miss, never a false report. Source-generated ([ObservableProperty]/[RelayCommand]) and inherited members count as resolved. One false-report class was measured: a HierarchicalDataTemplate's own ItemsSource mis-pinned onto its content read 8/8 false on MahApps.Metro and is fixed + fixture-pinned (0 after). So read a hit as high-confidence evidence to verify at its file and line, not as proof.

Returns JSON: count and unresolvedBindings (view, viewModel, member, line; one entry per site), plus markupFilesScanned and bindingSitesInMarkup from a live disk walk, which tell a clean zero from 'no markup at all'. The denominator of count: sitesJudged (root member checked on a resolved type) and sitesSkipped, by reason in sitesSkippedBy; judgementNote names any gap to bindingSitesInMarkup. Both null on a recalled session.

Read-only. The findings come from the LIVE analysis: call refresh_session after edits. A recalled DB snapshot reports none, and a 'note' says so when the session looks recalled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"The session_id returned by analyze_solution."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With annotations covering the safety profile (readOnly/idempotent/non-destructive/closed-world), the description still adds substantial behavioral context the annotations cannot: the conservative 'skip carries the accuracy claim' recall-vs-precision contract, the single measured false-report class with its fixture-pinning, the caveat that a hit is evidence to verify not proof, and the live-analysis requirement ('call refresh_session after edits') plus the recalled-snapshot failure mode.

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?

Front-loaded with the purpose and routing before drilling into coverage mechanics, returns, and caveats, and each paragraph has a distinct role. It is nonetheless very long and dense for a one-parameter tool, with the skip/accuracy rationale restated, so it stops short of maximal conciseness.

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?

No output schema exists, yet the description fully specifies the return shape (count, unresolvedBindings with view/viewModel/member/line, markupFilesScanned, bindingSitesInMarkup, sitesJudged, sitesSkipped, sitesSkippedBy, judgementNote) and how to interpret a zero. Nothing an agent needs to call or correctly read the tool is missing.

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

Parameters3/5

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

One parameter with 100% schema coverage, so the schema fully documents sessionId (session_id from analyze_solution, or an absolute .sln/.slnx/.slnf path). The description adds no additional syntax or format meaning beyond that, so the baseline 3 applies.

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 and resource ('List silently broken XAML bindings: a {Binding X} whose root member does NOT exist on its confidently resolved DataContext view-model') and pins the exact defect class ('neither the compiler nor render-smoke tests catch'). It distinguishes itself from find_binding_usages and find_resource_usages by name, so an agent can route without opening a schema.

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 an explicit trigger ('Use it after renaming or removing view-model members'), states its scope limit ('judges the ROOT member of a binding path only'), and names the alternatives for the adjacent task ('To see where a member or a resource key is bound use find_binding_usages / find_resource_usages'). When-to-use, when-not, and alternatives are all present.

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