Skip to main content
Glama

ui_press

Activate a widget's own action through AT-SPI after verifying it still matches the expected name or role, preventing wrong presses when the interface tree shifts.

Instructions

Invoke a widget's own action through AT-SPI -- the preferred way to act on this desktop. Requires expect_name or expect_role, and refuses if the path no longer points at that widget, so a shifted tree cannot make you press the wrong thing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoA widget number from the last screen_map; path, expect_name and expect_role are filled from it. Give ref OR path, never both.
lookNoWhat to show you afterwards. Default "auto": wait for the screen to stop changing, measure how much this action changed, and attach a picture of the affected window only if something did change -- so a click that hit nothing costs no tokens and says so. "window" always attaches it, "screen" uses the whole desktop (slower, 6x the tokens), "region" uses look_at, false skips all of it. Use false for the middle of a sequence you are going to check at the end anyway.auto
pathNoIndex path from ui_find, e.g. "gedit/0/3/1"
look_atNoRectangle for look:"region", in screen pixels. Object form {x, y, width, height} or array form [x, y, width, height].
expect_nameNoName the widget should still have (substring)
expect_roleNoRole the widget should still have
action_indexNo
settle_max_sNoHow long to wait for the screen to stop changing before looking. Raise it for an app that animates slowly; set it to 0 to capture immediately.
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it explains that the tool acts through the widget's own AT-SPI action and adds a meaningful safety detail — it refuses when the path no longer matches the expected widget, preventing accidental presses on the wrong element. It does not detail side effects or failure output, but the core behavior is clearly disclosed.

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?

Two sentences, both informative: the first states purpose and preference, the second states the critical safety constraint. No filler, no repetition of schema content, and the most decision-relevant information is front-loaded.

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?

For an 8-parameter tool with no annotations and no output schema, the description covers the essential selection and safety context. It could go further by describing what the action actually returns or how failures surface, but the parameter schema covers the remaining operational details well.

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 coverage is high at 88%, so the schema already documents most parameters. The description adds genuinely non-schema value by stating that expect_name or expect_role is required at runtime, despite the schema's required list being empty, and by explaining the safety consequence of these guards.

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 states a specific action (invoke a widget's own action) and the mechanism (AT-SPI), making clear this is not a coordinate click like pointer_click or a key press like press_keys. Calling it 'the preferred way to act on this desktop' further distinguishes it from sibling tools.

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?

Explicitly frames the tool as the preferred way to act on the desktop, which tells the agent when to reach for it over pointer-based alternatives. It does not spell out when to avoid it or explicitly name alternatives, so it falls short of a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/tristanmuzzu/deskwright'

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