Skip to main content
Glama
thebtf

netcoredbg-mcp

by thebtf

ui_switch_window

Idempotent

Retarget UI automation to a different top-level window of the same process, enabling interaction with modal dialogs, file pickers, or popups. All subsequent UI calls operate inside the new window.

Instructions

Retarget the UI backend at a different top-level window of the same process.

Use this to enter modal dialogs, file pickers, or popups that appear as sibling windows of the app's main window. After switching, all subsequent ui_* calls (find_element, click, send_keys, etc.) operate inside the new window's subtree.

Typical flow:

  1. ui_get_window_tree() → inspect "windows" array

  2. ui_switch_window(name="Create collection") → enter dialog

  3. ui_find_element(control_type="Edit") → locate dialog TextBox

  4. ui_send_keys_batch(keys=["Characters", "{ENTER}"]) → type + submit

  5. After dialog closes, ui_switch_window(name="Main App Title") to return to the original window

Requires the FlaUI bridge backend; the pywinauto fallback raises NotImplementedError. At least one of name or automation_id must be provided; automation_id is matched first.

Args: name: Window title (e.g., the dialog's Title/Name property) automation_id: Window's AutomationId property (if any)

Returns: {"switched": True, "title": "...", "automationId": "..."} on success

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
automation_idNo
Behavior5/5

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

Adds significant context beyond annotations: requires FlaUI backend, raises NotImplementedError with pywinauto, describes post-dialog behavior, and explains the return value.

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?

Well-organized with clear sections (purpose, usage flow, backend note, parameters, returns), no redundant text, and essential information front-loaded.

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?

Comprehensive for a tool with 2 parameters: includes purpose, prerequisite, return format, and integration with other ui_* tools.

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?

Explains the meaning of 'name' and 'automation_id' (window title and AutomationId), gives examples, and notes matching priority, compensating for 0% schema description coverage.

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's verb ('retarget') and resource ('top-level window'), and differentiates it from siblings by specifying use cases like entering modal dialogs, file pickers, or popups.

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 explicit when-to-use scenarios and a typical flow, but does not explicitly state when not to use or contrast with other window-related tools.

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