Skip to main content
Glama
tiefeiyu
by tiefeiyu

qt_focus

Set focus on a specific UI element in a running Qt application, enabling subsequent automated interactions. Works best with QWidget; QML may require in-app focus handling.

Instructions

Set focus on a UI element.

Best effort: QWidget focus works directly; some QML items may need an explicit focus request from within the app and report ok without changing focus.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
element_idYes
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the best-effort nature and the specific QML limitation where the tool may report success without actually changing focus. This is valuable transparency about potential false positives, though it could mention more about error behavior or side effects.

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 brief and front-loaded: two sentences that first state the purpose and then provide essential caveats. Every sentence adds value, with no redundant information.

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?

Given the tool's simplicity and the presence of an output schema, the description is reasonably complete. It covers the core action and a significant behavioral quirk. However, it lacks guidance on when to use this instead of other interaction tools and could clarify the role of session_id in the context of UI automation.

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

Parameters2/5

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

The schema has 0% description coverage and the tool description does not explain the parameters. The names 'session_id' and 'element_id' are somewhat self-explanatory, but the description does not even hint at their roles, and there is no mention of required context or how element_id relates to the set-focus operation.

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 function: setting focus on a UI element. This is a specific verb+resource, and it distinguishes itself from sibling tools like qt_mouse_click or qt_set_property, which perform different actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the use case (focusing a UI element) but does not explicitly compare to alternatives or state when not to use it. The caveat about QML items gives some context, but there is no clear directive on when to choose this over other methods.

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/tiefeiyu/qt-commander'

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