Skip to main content
Glama

tool_element_action_at

Act on an element printed by the latest skyshot of a window. Pass hwnd, shot_id and the element's printed index from the same tool_skyshot response. A missing or stale shot_id or an index omitted from the response is refused before acting.

Instructions

Act on an element printed by the latest skyshot of a window. Pass hwnd, shot_id and the element's printed index from the same tool_skyshot response. A missing or stale shot_id or an index omitted from the response is refused before acting. If refused, take a fresh full shot with disable_diff=true and use its shot_id and index. MUTATING (soft): serialized across agent sessions; no physical input injected. Actions: press, set_value, select, toggle, expand, collapse, scroll_into_view, focus. set_value also needs text.

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": {
      "hwnd": "<hwnd>",
      "index": "<index>",
      "action": "<action>"
    },
    "name": "tool_element_action_at"
  }
}

Input Schema

NameRequiredDescriptionDefault
hwndYes
textNo
indexYes
actionYes
shot_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • addedInput schema / properties / shot_id
      Added value: +{
      +  "default": "",
      +  "title": "Shot Id",
      +  "type": "string"
      +}
    • addedInput schema / properties / text / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / text / default
      Previous value: -""New value: +null
    • removedInput schema / properties / text / type
      Removed value: -"string"
  2. First observedv0.3.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses that the tool is mutating (soft), serialized across agent sessions, and injects no physical input, plus the refusal behavior for stale shot_id or missing index. It does not explain what a successful action returns or whether the target window must be foregrounded.

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 prerequisite and the refusal/recovery rule are front-loaded, and every sentence carries an operational fact with no filler. The density of domain jargon ('printed index', 'soft' mutation) costs a little immediate readability but not correctness.

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 a 5-parameter mutation tool with an output schema already documenting return values, the description covers prerequisites, failure modes, mutation semantics and the action vocabulary. Remaining gaps are secondary details such as whether focus must be established first and what happens to a failed action mid-session.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: hwnd, shot_id and index are tied to their source in a prior skyshot response, index is defined as the element's printed index, and text is tied specifically to set_value. It also supplies an action vocabulary (press, set_value, select, toggle, expand, collapse, scroll_into_view, focus) that the schema leaves as a bare string with no enum.

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?

The description states a specific verb+resource: act on an element identified by a printed index from a prior skyshot. It clearly scopes the tool to elements surfaced by tool_skyshot, which distinguishes it from the point/coordinate siblings. It stops short of contrasting itself with the similarly named tool_element_action, so the boundary is not fully unambiguous.

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?

It spells out the prerequisite (hwnd, shot_id and index must come from the same tool_skyshot response) and gives an explicit recovery path when refused: take a fresh full shot with disable_diff=true and reuse its shot_id and index. That is strong operational guidance. It does not name when to prefer tool_element_action or tool_click_at instead, so the alternative-selection guidance is incomplete.

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