Skip to main content
Glama
thebtf

netcoredbg-mcp

by thebtf

ui_get_window_tree

Read-onlyIdempotent

Get the visual tree of a debugged .NET application to inspect and interact with top-level windows and modal dialogs. Enables GUI automation during debugging.

Instructions

Get the visual tree of the debugged application — ALL top-level windows.

Covers the main app window and any sibling windows (modal dialogs, popups, file pickers) owned by the same process. Modal dialogs created via WPF Window.ShowDialog() are sibling top-level windows, not descendants of the main window — they appear in the "windows" array alongside the main window.

Call after start_debug and wait for the application window to appear.

Args: max_depth: Maximum depth to traverse within each window (default 3) max_children: Maximum children per element (default 50)

Returns: FlaUI backend: {"windows": [tree, ...], "count": N, "primary": "Main App"} Each tree entry carries automationId, controlType, name, rect, children, etc. Use ui_switch_window to retarget subsequent calls at a specific window (e.g. a modal dialog).

pywinauto fallback backend: a single-window tree dict with
automationId/name/rect/children at the root (no windows array,
no count, no primary). Callers that need to support both
backends should probe for the "windows" key and fall back to
treating the response itself as a single-window tree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNo
max_childrenNo
Behavior5/5

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

Annotations give readOnlyHint and idempotentHint. Description adds significant context: explains window hierarchy (modal dialogs are siblings), details return format differences between FlaUI and pywinauto backends, and notes that 'windows' array includes main window and siblings. No contradiction.

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?

Structured with paragraphs: main purpose, behavioral nuance, prerequisite, parameters, return format. Front-loaded with key info. Slightly long but every sentence adds value; no wasted 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?

Covers prerequisites, parameters, return details for two backends, and related tool. No output schema but description compensates. Could mention error conditions (e.g., no debug session) but overall complete given tool complexity.

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?

Schema has no descriptions (coverage 0%). Description clearly explains both parameters: max_depth (default 3) and max_children (default 50), adding meaning beyond schema. Could further clarify edge cases (e.g., depth=0), but adequate.

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 tool gets the visual tree of the debugged application, explicitly noting it covers ALL top-level windows. It distinguishes from siblings by explaining that modal dialogs from ShowDialog() are sibling top-level windows, not descendants, which differentiates it from tools like ui_find_element that target specific elements.

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?

Provides clear usage guidance: call after start_debug and wait for window. Mentions using ui_switch_window to retarget later calls. Lacks explicit alternatives or when-not-to-use, but the description of backend differences and focused purpose compensates.

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/thebtf/netcoredbg-mcp'

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