Skip to main content
Glama
thebtf

netcoredbg-mcp

by thebtf

ui_set_focus

Idempotent

Set keyboard focus to a UI element using automation ID, name, or other locators. Ensures subsequent key input reaches the correct target.

Instructions

Set keyboard focus to a UI element.

Uses UIA-based Focus() for FlaUI backend (monitor/DPI-agnostic), or element search + set_focus for pywinauto backend.

Call this before ui_send_keys to ensure keys go to the right element.

Args: automation_id: AutomationId property (FlaUI + pywinauto) name: Element's Name/Title property (FlaUI + pywinauto) control_type: Control type (pywinauto only) root_id: Optional AutomationId to scope search (pywinauto only) xpath: Optional XPath expression (pywinauto only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
automation_idNo
nameNo
control_typeNo
root_idNo
xpathNo
Behavior4/5

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

Annotations indicate idempotentHint=true. Description adds backend-specific behavior (FlaUI vs pywinauto) and the link to ui_send_keys. No contradictions; adds useful context beyond annotations.

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?

Concise and well-structured: purpose, backend behavior, usage note, and parameter list. No unnecessary text, but could be slightly more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema; description lacks details on return values or error handling (e.g., if element not found). For a simple set operation, it's mostly adequate but could be more complete.

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 5 parameters with 0% coverage. Description explains each parameter's purpose and which backend applies (e.g., control_type for pywinauto only). Adds meaning beyond bare schema titles.

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 'Set' and the resource 'keyboard focus to a UI element'. It distinguishes itself from sibling tools like ui_click and ui_send_keys by specifically addressing focus setting.

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 guidance: 'Call this before ui_send_keys to ensure keys go to the right element.' This clarifies a common use case. Lacks explicit when-not-to-use, but context is sufficient.

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