Skip to main content
Glama

vm_ui_act

Finds a matching UI element in a VM window by name, role, or AutomationId and acts on it via UI Automation—invoke, set value, toggle, select, expand, collapse, or focus—without coordinates.

Instructions

Finds the nth element (depth-first) of a window (default: foreground) whose name (exact, case-insensitive), role (e.g. Button, Edit) and id (AutomationId) match the given ones, and acts on it through UI Automation, with no coordinates. action: invoke (click a button or menu item), set_value (needs value; text boxes), toggle, select, expand, collapse, focus. If nothing matches, the error lists candidate elements.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "vm": "<vm>",
      "action": "<action>"
    },
    "name": "vm_ui_act"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
vmYes
nthNo
hwndNo
nameNo
roleNo
valueNo
actionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the depth-first nth selection, the default foreground window, and that a no-match error lists candidates. It omits timing/focus side effects, permission needs, and whether actions like set_value or toggle are reversible.

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?

The description is a single dense sentence plus a compact action list, with the matching logic front-loaded before the action semantics. It is efficient, though the action list could be formatted more scannably.

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?

For an 8-parameter tool with no annotations and no output schema, the definition covers matching and action behavior reasonably well. It leaves notable gaps around the vm parameter, failure modes beyond no-match, and return/observability information.

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 0%, so the description must compensate, and it does for most parameters: nth is depth-first index, name is exact case-insensitive, role examples are Button/Edit, id is AutomationId, and value is required for set_value. It does not explain the vm parameter or what a null hwnd means beyond the foreground default.

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?

States a specific verb chain — find an element by name/role/id and act on it via UI Automation — and the 'no coordinates' detail distinguishes it from coordinate-based siblings such as vm_click. It does not name those alternatives, so the differentiation is implied rather than explicit.

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?

Usage is implied by the element-matching and action mechanics, and the action list signals intended scenarios. However, it never states when to choose this over vm_click, vm_key, or vm_ui_tree, nor when it is unsuitable.

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