Skip to main content
Glama

desktop_wait

Pause execution or block until a desktop condition is met, such as elapsed milliseconds, an element, window, text, menu, notification, or lifecycle event, so automated actions can be verified.

Instructions

agent-desktop wait: Wait for time (ms), element presence, text, or window appearance

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "desktop_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
msNoMilliseconds to pause
appNoScope element, window, or text wait to this application
menuNoBlock until a menu surface is open
textNoBlock until text appears in the app's accessibility tree; with --notification, filter notification text
countNoExpected match count for --text waits
eventNoBlock until a desktop lifecycle signal, detected by baseline diff without needing to know the id/title up front: window-opened, window-closed, app-launched, app-terminated, focus-changed, surface-appeared, surface-dismissed
valueNoExpected value for --predicate value
actionNoAction for --predicate actionable: click (default), type, set-value, or clear
windowNoBlock until a window with this title appears; with --event, narrows the event wait to that window title instead of selecting a mode
elementNoBlock until this element ref appears in the tree
timeoutNoTimeout in milliseconds for element/window/text waits
predicateNoElement wait predicate: exists, enabled, visible, actionable, or value
window_idNoOptional: narrow --event window-opened/window-closed/focus-changed to one window ID
menu_closedNoBlock until the menu surface is dismissed
notificationNoBlock until a new notification arrives

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It never states that the call blocks, that it throws or returns on timeout, what the 30s default timeout implies, or what happens when multiple modes are combined (e.g. --event plus --window). Only the terse phrase 'Wait for' signals blocking semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded line with no filler, but at this level of terseness for a 15-parameter, multi-mode tool the brevity reads as under-specification rather than efficiency. The mode list it does include is inconsistent with the parameters it is meant to summarize.

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

Completeness2/5

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

For a 15-parameter blocking tool with no annotations and no output schema, the description covers only a fraction of the supported modes and gives no return-value or timeout-error semantics. An agent could not determine from this text alone which combination of parameters constitutes a valid wait.

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

Parameters3/5

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

Schema description coverage is 100% across all 15 parameters, including enum-like lists for event and predicate, so the schema already does the heavy lifting. The description merely restates four of the modes and adds no syntax, precedence rules, or interaction details beyond the schema, making 3 the correct baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (wait) and enumerates several blocking conditions: time in ms, element presence, text, and window appearance. That distinguishes it from action tools like desktop_click, though it omits the schema's other wait modes (event lifecycle, notification, menu, predicate) and does not contrast with similarly-named siblings such as desktop_check or desktop_is.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to choose this blocking wait versus desktop_check, desktop_is, or desktop_find, and no mention of preferred timeouts or when to prefer an event wait over a polled text wait. Usage is only implied by the word 'wait'.

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