Skip to main content
Glama

qt_key_press

Send key events to widgets in PySide6 applications for automated testing and interaction. Specify a key name and optional widget reference to simulate keyboard input.

Instructions

Send a key event to a widget or the focused widget.

Args:
    key: Key name (e.g., 'Return', 'Escape', 'Ctrl+S', 'a').
    ref: Widget ref. If omitted, sends to the currently focused widget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
refNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the basic action (sending key events) and target behavior (focused widget fallback), but doesn't mention important behavioral aspects like whether this simulates physical key presses, how it handles modifier keys, error conditions, or timing considerations. It provides minimal but accurate behavioral context.

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 perfectly structured with a clear purpose statement followed by parameter explanations. Every sentence serves a specific purpose with zero wasted words. The two-sentence format with parameter documentation is efficient and front-loaded.

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?

Given the tool has an output schema (which handles return values), no annotations, and only 2 parameters, the description is reasonably complete for basic usage. However, as a UI automation tool that could have complex behavioral implications, it lacks details about error handling, timing, and interaction with other Qt tools that would be helpful for robust agent use.

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?

With 0% schema description coverage, the description must compensate for the schema's lack of documentation. It successfully explains both parameters: 'key' gets examples of valid values (e.g., 'Return', 'Ctrl+S'), and 'ref' gets clear semantics about widget targeting and default behavior. This adds significant value beyond the bare schema.

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 specific action ('Send a key event') and target ('to a widget or the focused widget'), distinguishing it from sibling tools like qt_click (mouse click) or qt_type (text typing). It uses precise technical language that identifies the exact function.

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?

The description provides clear context about when to use the tool (sending key events) and offers guidance on the 'ref' parameter (use when targeting specific widgets vs. focused widget). However, it doesn't explicitly state when NOT to use it or name specific alternatives among the many sibling 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/0xCarbon/qt-mcp'

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